The syntaxe I used to write the code above is what I found mimic c2 event sheet the closest.
[code]+Object: Condition ->Object: Action[/code]
I use "+" for condition and "[indentation] ->" for action When I indent condition block it means they are nested [code]+Object: condition +Object: nested condition ->Object: action[/code]
The code I posted above is at beginner level (if you except the use of dt which is just a tad more advanced... maybe) as dt is the time between two tick of the game, the 'Timer' variable will just count time.
Anyway, if you don't understand the code above, you need to follow some tutorial and read the manual.
thats not what i want to do. right now the first wave are very weak monsters. the first wave = mode0.
as you see every time every monster are dead and 30 secondes has passed, it go back to mode0. i want it to go to mode3 so i can make a stronger wave with different monsters. then when they are all dead and 30 second has passed it goes to mode4. etc
Well the meaning of the variable in my example is not the same as the meaning you want to put in it. My variable "mode" meant to differenciate phases in cyclic events (I could have called it "phase" instead of mode then) You on the contrary want to make something evolve. So, along with the mode (or phase if you want to rename it) variable, you need another one which will carry the meaning of "difficulty" Then you can, as Kyat suggested, use this variable to increase the time of each wave like
atkDuration = 30 + 10*difficulty 30 would be the starting point 10 would be the increment of each difficulty mode (if you increment it one by one)
hmmm. im probably retarded because no one seems to understand :(
i want each wave to be completly different and easy to cuztomize. maybe a group for each one, wave1 (8 monster, that spawn at every 3 seconds, with 5 health), wave2 (6 mmonster that fire at player, spawn at every 2 seconds), and so on.
the only thing i want to stay the same for each wave is for how the wave is activated and that when every monster is dead there is a pause of 5 seconds and then we move to another wave.
yeah that's what I said, the "mode" variable will give you the "stay the same part" you refer to. You need other variable to build difficulty over waves.
If you want to pick in a list of monster you have, you will have to have a way to know what monster in what wave. Maybe you can have an instance variable in your different monster that will tell in which wave they belong, or maybe you can have a big array that hold the pattern of each wave. But definitely don't use the "mode" variable for other thing than handling phases.Yann2012-01-20 04:08:13
yeah i think the best way to go would be to treat each wave individually. the thing is i dont know how to when they all die, pause, go to wave1, then 30 seconds pass, they all die, pause, go to wave2, etc