Hi please read this. im so stupid

Talk about making games.

Hi please read this. im so stupid

Postby The achievement » Sun Apr 09, 2006 6:16 pm

Ok last thing everybody, (or many more to come) is there any way i could make when i kill all my enemies in the first level i could make a teleport actor just show up and when you you hit it, you go to the next level. (which my next level is a filled region. is that ok?

How the hek do i do this?

i know its an if statement.


By the way can anyone tell me what the if statement does. and what does it mean? thank you everybody! you really help me alot! :D
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby DilloDude » Mon Apr 10, 2006 2:01 am

Say you have three types of enemies on level 1: En1_1, En1_2, En1_3.
I am not sure with ActorCount wether it is the number in the activation region or total, so level two's enemies should be En2_1...
Add an enemy_test1 actor. In draw actor,
Code: Select all
if(ActorCount("En1_1") + ActorCount("En1_2") + ActorCount("En1_3") == 0)
{
    Player.x = Level2Start.x; \\where Level2Start is in the place where you should move to
    Player.y = Level2Start.y;
    view.x = Player.x - (view.width/2);
    view.y = Player.y - (view.height/2);
    DestroyActor("Event Actor");
}

This will check if the total number of enemies is 0, and if it is, it will move the player to the start of level 2, and move the view so it is centered on the player.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby DilloDude » Mon Apr 10, 2006 4:55 am

I have just checked, and ActorCount only counts the actors in an activation region, so if you have regions around each level, you don't need to have EN1_1 etc. but just EN_1, EN_2, and you can use the same types of enemies in all levels.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby The achievement » Mon Apr 10, 2006 4:07 pm

wow, that was very simple. thanks dillodude!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :D :D :D :D
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest