Page 1 of 1
textNumber
Posted:
Sat Mar 03, 2007 12:46 am
by Caaz Games
How do i make a textnumber Change an animation (of a different actor)every 3rd number?
Posted:
Sat Mar 03, 2007 1:41 am
by makslane
To change an animation you need to use the Change Animation action.
To change a frame into animation you can use the animpos variable.
Posted:
Sat Mar 03, 2007 1:46 am
by Caaz Games
i mean like every time the number changes to 3, then 6 , then 9 etc. and then it will change the animation of an actor.
Posted:
Sat Mar 03, 2007 1:01 pm
by makslane
Try this:
- Code: Select all
if(yourvariable % 3 == 0)
{
//Your command here
}
yourvariable must be a integer variable.
Posted:
Sat Mar 03, 2007 8:35 pm
by Caaz Games
It Says "Illegal Binary operation to '%'"
Do you know whats wrong?
Posted:
Sat Mar 03, 2007 9:31 pm
by makslane
The variable must be integer, not float (real).
This can solve the problem, if you want use a float variable (like textNumber):
- Code: Select all
if((int)textNumber % 3 == 0)
{
//Your commands here
}
Posted:
Sun Mar 04, 2007 1:59 am
by Caaz Games
its not changing the animation ... maybe you can try. this is the zip file without the code.
p.s. if anyone wants to know what this game will be like when im finished click the link in my sig.