Woaw Thanks you so much, I didn`t know fixed was a variable of type "Real". I was sure it was just a keyword used in the database to say it could not be used to return anything except a specific value for a specific function or something.
I tried during a while to make the built-in function UnitGetFacing to return the angle of unit in a variable but found out that it would never return the value to an integer... So now Im wondering, I would it be possible to know the angle of the direction a unit is currently facing. I am trying to make a unit bounce off walls (no height). Is there any way?
Im not necessarly seeking for an absolute solution, something that could put me on the right path would be appreciated tough.
Hmmm, Im currently trying to do it your way to see if it could solve the problem but it seem that I can`t pass any paramaters to my function. I used to use the Unit keyword plus a Unit parameter so that I can choose what the unit would be within the Galaxy Trigger system but now it seems I can`t do anything with that solution. Its kinda annoying. Seems like the editor is slowly getting more and more annoying.
I will still search around to see if there is anything that can be done but right now there`s a serious lack of information about the programming language and the available functions. Seems like half of them are working or have to be used in a very specific way.
But now, for some reason, the compiler does not want to take my very basic action when trying to insert the return integer inside a variable of type integer.... It does compile it without adding the action to get the data, but as soon as I try to combine both, it messed up, does anyone has a clue of whats happening? The only error being reported is a syntax error, thanks great compiler! :P
function :
Quote:
int angle = UnitGetFacing(Unit);
return angle;
Action :
Quote:
Variable - Set BallAngle = (GetAngle((Last created unit)))
Compiler : (Error shown on the line with the )
Quote:
lv_ballAngle = int angle = UnitGetFacing(Unit);
return angle;;
It seems like it does not return the integer at the right time or something, there is even two semi-colon which seems pretty bad.
I tried both, but my function was still not possible to use anywhere, (well exept the action one could still be used as an action in trigger of course)
I have recently tried to create a new function within the GUI, so I did just like I would normally do to create a new Trigger, changed the return so that it return an integer, check so that it readed custom script and then added some script that returned an integer.
The problem is, I can seem to find a way to retrieve the returned integer via any action made in my normal triggers. I have created a variable of type integer for exemple, went into the value and searched for my function anywhere and could not find it.
How am I supposed to re-use my functions within my other trigger's action?
0
Woaw Thanks you so much, I didn`t know fixed was a variable of type "Real". I was sure it was just a keyword used in the database to say it could not be used to return anything except a specific value for a specific function or something.
That make a lots of sense
0
I tried during a while to make the built-in function UnitGetFacing to return the angle of unit in a variable but found out that it would never return the value to an integer... So now Im wondering, I would it be possible to know the angle of the direction a unit is currently facing. I am trying to make a unit bounce off walls (no height). Is there any way?
Im not necessarly seeking for an absolute solution, something that could put me on the right path would be appreciated tough.
0
Hmmm, Im currently trying to do it your way to see if it could solve the problem but it seem that I can`t pass any paramaters to my function. I used to use the Unit keyword plus a Unit parameter so that I can choose what the unit would be within the Galaxy Trigger system but now it seems I can`t do anything with that solution. Its kinda annoying. Seems like the editor is slowly getting more and more annoying.
I will still search around to see if there is anything that can be done but right now there`s a serious lack of information about the programming language and the available functions. Seems like half of them are working or have to be used in a very specific way.
0
Ok, I got it to work successfully :P
But now, for some reason, the compiler does not want to take my very basic action when trying to insert the return integer inside a variable of type integer.... It does compile it without adding the action to get the data, but as soon as I try to combine both, it messed up, does anyone has a clue of whats happening? The only error being reported is a syntax error, thanks great compiler! :P
function :
Action :
Compiler : (Error shown on the line with the )
It seems like it does not return the integer at the right time or something, there is even two semi-colon which seems pretty bad.
0
Oh that would make sense, Im going to try that as soon as possible, Thanks! :P
0
I tried both, but my function was still not possible to use anywhere, (well exept the action one could still be used as an action in trigger of course)
0
Hey everybody,
I have recently tried to create a new function within the GUI, so I did just like I would normally do to create a new Trigger, changed the return so that it return an integer, check so that it readed custom script and then added some script that returned an integer.
The problem is, I can seem to find a way to retrieve the returned integer via any action made in my normal triggers. I have created a variable of type integer for exemple, went into the value and searched for my function anywhere and could not find it.
How am I supposed to re-use my functions within my other trigger's action?
Thanks