Creating different actors based on collision

Game Editor comments and discussion.

Postby Hyperyon » Fri Jul 28, 2006 10:25 am

The code doesnt repeat the events :(

my code is something like this:



count++;

if(count == 1)
{
//Create actor 1
}
else if(count == 2)
{
//Create actor 2
}
else if (count ==3)
{
//destroy actor 1
//destroy actor 2
}
Lets keep our dreams alive!
Hyperyon
 
Posts: 148
Joined: Sat Jun 24, 2006 1:29 pm
Score: 0 Give a positive score

Postby makslane » Fri Jul 28, 2006 12:35 pm

Are the code executing some condition at first time?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Hyperyon » Fri Jul 28, 2006 1:57 pm

yes :?
Lets keep our dreams alive!
Hyperyon
 
Posts: 148
Joined: Sat Jun 24, 2006 1:29 pm
Score: 0 Give a positive score

Postby relaxis » Fri Jul 28, 2006 8:15 pm

you're trying to use a SWITCH using IF AND ELSE statements lol.

Code: Select all

switch(whatever condition you want - in this case Count++)

and something like

case1* = create actor

case2* = create actor


* case means basically "when the value of count++ is = to 1,2,3,4,5 etc...
then execute command create actor
User avatar
relaxis
 
Posts: 82
Joined: Mon Jul 17, 2006 2:06 pm
Location: Luxembourg
Score: 1 Give a positive score

Previous

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest