Questions tagged [angelscript]

AngelScript is a free, open source, flexible, and cross-platform scripting library meant to be embedded in applications. The purpose is to provide an easy to use library that is powerful, but that isn't weighed down by a large amount of rarely used features.

AngelScript is a free, open source, flexible, and cross-platform scripting library meant to be embedded in applications. The purpose is to provide an easy to use library that is powerful, but that isn't weighed down by a large amount of rarely used features.

26 questions
5
votes
0 answers

Catching/Handling exceptions thrown in AngelScript functions

I'm playing around with AngelScript, and one thing I can't seem to wrap my head around is how to catch exceptions thrown from C++ but called from AngelScript. Here's what I've got so far: // test.as void main() { print("Calling…
Dovahkiin
  • 946
  • 14
  • 25
3
votes
1 answer

A* pathfinding not taking shortest path

My A* pathfinding function always gets to its intended destination, but it almost always goes a bit out of the way. Here's an example: [I made a nice image to show my issue, but apparently it won't post until my reputation reaches 10; sorry, I'm…
Adam Lampman
  • 97
  • 1
  • 8
2
votes
2 answers

How to register SFML Vector2 operators with AngelScript?

I'm working on a game engine that uses SFML. I'm currently working on adding scripting with AngelScript, however, I'm having trouble registering sf::Vector2 with AngelScript. I have the basic constructor set up, I can use sf::Vector in AngelScript,…
veridis_quo_t
  • 342
  • 3
  • 14
2
votes
1 answer

what is this c++ templated function doing

I'm trying to write a thin wrapper around AngelScript. I'm having trouble figuring out how to wrap around a particular struct. Here is the struct definition for the struct I want to wrap, asSMethodPtr: template struct asSMethodPtr { …
Jarrett
  • 1,767
  • 25
  • 47
1
vote
1 answer

Angelscript - cast string to int

I could use some help. How do I explicity convert a string to an int. Here is an example of what I would like to have working: string string_num = "" + 1; int num = cast(string_num); I've tried searching the internet using the…
AS_noob
  • 13
  • 2
1
vote
1 answer

Angelscript calling overriding function from object in array

I have noticed that if you have an array of a class and put in an object that inherits from said class and try to call the overriding function from a for loop it runs the overridden function example: class Entity{ void Update(){ …
user12586940
1
vote
3 answers

Angelscript wrong type conversion

I'm currently trying to use angelscript with a simple code, following the official website's examples. But when i try to initialise a double variable like below in my script : double x=1/2; the variable x appears to be initialised with the value…
mat
  • 11
  • 2
1
vote
2 answers

AngelScript G++ Linker error

I'm trying to use AngelScript on a 64 bit Linux machine (Linux Mint 14). I have installed the gnuc project that comes with the AngelScript sdk and tried to compile with the following command: g++ -fno-strict-aliasing main.cpp -langelscript This…
RaptorDotCpp
  • 1,425
  • 14
  • 26
1
vote
1 answer

c++ embeded template templates

I have a class that 'wraps' an AngelScript Method. Basically, you send it the Class, method return type, a pointer to the method, and a list of arguments. So far, I am able to successfully make this Method object when I am 'binding' a class method…
Jarrett
  • 1,767
  • 25
  • 47
1
vote
1 answer

using angelscript compile error

I'm trying to use angelscript 2.25.1 using gcc 4.7.1 I compiled angelscript without issues. When I try to compile my project that uses angelscript, however, I'm getting this error: jarrett@jarrett-g74s:~/projects/myproject$ scons scons: Reading…
Jarrett
  • 1,767
  • 25
  • 47
0
votes
1 answer

Is there a non inline asm version of AngelScript?

I recently worked a bit with AngelScript and came across some linker errors when trying to compile in x64. If I try to compile my c++ code in x86 everything works fine. After a bit of research I noticed that inline assembly is not supported anymore…
user13455484
0
votes
1 answer

Angelscript transfer array from C++

I need to transfer an array of tiles from C++ to Angelscript, I have tried adding a function that returns an std::vector but it returns this error Failed in call to function 'RegisterGlobalFunction' with 'array GetTilesAt(int x, int y)'…
user12586940
0
votes
1 answer

AngelScript - Avoid implicit default constructor from running

I'm currently testing some simple AngelScript stuff, and noticed something I find a bit strange when it comes to how objects are initialized from classes. Let's say I define a class like this: class MyClass { int i; MyClass(int i) { …
Magnus Bull
  • 1,027
  • 1
  • 10
  • 21
0
votes
2 answers

Enums or constants in AngelScript

In other programming languages I can use static class methods or enums to encapsulate constants: enum Command { command_1 = "0x00001", command_2 = "0x00002", command_2 = "0x00003" } or class Command { static command_1 =…
Michael Dorner
  • 17,587
  • 13
  • 87
  • 117
0
votes
2 answers

How do you ACCESS Array Elements using Angelscript?

I am trying to create a simple inventory system for a game I am creating. The inventory needs 2 pieces of information for each item in the inventory, "item name" and "item description". The information I read from the Angelscript website says to…
captainx
  • 25
  • 7
1
2