help with if

Talk about making games.

help with if

Postby mr. tc » Mon Oct 17, 2005 12:00 pm

how doe s the if command works ???
because i thougt that the if command should be used like this:
Code: Select all
if(sub = 5){
ChangeAnimation("player", "submarine", FORWARD);
DestroyActor("water");
}
mr. tc
 
Posts: 4
Joined: Mon Oct 17, 2005 11:57 am
Score: 0 Give a positive score

Postby makslane » Mon Oct 17, 2005 2:20 pm

Use ==

if(sub == 5)
{
...
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby mr. tc » Tue Oct 18, 2005 11:45 am

thanxs for the help
mr. tc
 
Posts: 4
Joined: Mon Oct 17, 2005 11:57 am
Score: 0 Give a positive score

Postby CdaMarinersFan » Fri Dec 16, 2005 5:06 am

Just remember, kiddies :), that you need to use == for conditional statements...
Image
User avatar
CdaMarinersFan
 
Posts: 109
Joined: Wed May 11, 2005 11:20 pm
Score: 0 Give a positive score

Postby DilloDude » Fri Jan 27, 2006 11:08 pm

Just don't forget to use = when you want to change a variable :lol: i've done that a few times- used == :lol:
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest