textNumber

Non-platform specific questions.

textNumber

Postby Caaz Games » Sat Mar 03, 2007 12:46 am

How do i make a textnumber Change an animation (of a different actor)every 3rd number?
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby makslane » Sat Mar 03, 2007 1:41 am

To change an animation you need to use the Change Animation action.
To change a frame into animation you can use the animpos variable.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Caaz Games » Sat Mar 03, 2007 1:46 am

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.
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby makslane » Sat Mar 03, 2007 1:01 pm

Try this:

Code: Select all
if(yourvariable % 3 == 0)
{
   //Your command here
}


yourvariable must be a integer variable.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Caaz Games » Sat Mar 03, 2007 8:35 pm

It Says "Illegal Binary operation to '%'"
Do you know whats wrong?
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby makslane » Sat Mar 03, 2007 9:31 pm

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
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Caaz Games » Sun Mar 04, 2007 1:59 am

:( 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.
Attachments
Race Warz[begin].zip
Just the beginning what i want is when you kill the three bad guys you'll turn into an "Anjel"
(134.11 KiB) Downloaded 161 times
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest