Page 1 of 1

Hi please read this. im so stupid

PostPosted: Sun Apr 09, 2006 6:16 pm
by The achievement
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

PostPosted: Mon Apr 10, 2006 2:01 am
by DilloDude
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.

PostPosted: Mon Apr 10, 2006 4:55 am
by DilloDude
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.

PostPosted: Mon Apr 10, 2006 4:07 pm
by The achievement
wow, that was very simple. thanks dillodude!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :D :D :D :D