This is a tutorial on how to add continues into your maze making map. I will start assuming the only thing you know about map making is from blood's tutorial.
Starting here:
Now you will make a region in the check point not quite touching the kill regions but not to far away like this:
you'll do that for each of your check points it helps to name them something like "check1"
First you'll make a trigger to set the checkpoints as a variable in an array it should look something like this:
- Code:
-
Event - Map initialization
Actions -
Set CheckVariable[1] = firstcheckpoint <gen>
Set CheckVariable[2] = secondcheckpoint <gen>
Set CheckVariable[3] = thirdheckpoint <gen>
Set CheckVariable[4] = fourthcheckpoint <gen>
Set CheckVariable[5] = fifthcheckpoint <gen>
Set CheckVariable[6] = sixthcheckpoint <gen>
Set CheckNumber = 1 <gen>
Set Lives = 5 <gen>
the CheckNumber variable comes in play at the lives trigger, it decides which check you revive at
then you will make the revive at check point trigger:
- Code:
-
Events - Unit - A unit enters check1 <gen>
Conditions - (Unit-type of (Triggering unit)) Equal to Demon Hunter
Actions
Set CheckNumber = (CheckNumber + 1)
Trigger - Turn off Lives <gen>
Hero - Add 200 experience to (Triggering unit), Hide level-up graphics
Unit Group - Pick every unit of type demon hunter and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)
Wait 1.00 seconds
Hero - Instantly revive DEmon Hunter 0001 <gen> at (Random Point in check(CheckNumber]), Hide revival graphics
Hero - Instantly revive DEmon Hunter 0002 <gen> at (Random Point in check(CheckNumber]), Hide revival graphics
Hero - Instantly revive DEmon Hunter 0003 <gen> at (Random Point in check(CheckNumber]), Hide revival graphics
//ect for all demon hunters//
Trigger - Turn on Lives <gen>
Trigger - Turn off (this trigger)
ok now that the checks and lives are set as variables you will make the lives trigger:
- Code:
-
Events - Unit - A unit Dies
Conditions -
And - All (conditions) are true
Conditions
(Number of living Demon Hunter units owned by Player 1 (red)) Equal to 0
(Number of living Demon Hunter units owned by Player 2 (blue)) Equal to 0
(Number of living Demon Hunter units owned by Player 3 (teal)) Equal to 0
//ect for all demon hunters//
Actions
If (all conditions are true) then do (then actions) else do (else actions)
If - Conditions
Lives greater than 0
Then - Actions
Set Lives = (Lives - 1)
Wait 1.00 seconds
Hero - instantly revive Demon Hunter 0001 <ge> at (Random point in CheckVariable[CheckNumber]), Hide revival graphics
Hero - instantly revive Demon Hunter 0002 <ge> at (Random point in CheckVariable[CheckNumber]), Hide revival graphics
Hero - instantly revive Demon Hunter 0003 <ge> at (Random point in CheckVariable[CheckNumber]), Hide revival graphics
//ect for all demon hunters//
Else - Actions
PlayerGroup - Pick every player in (all players) and do (actions)
Loop - Actions
Game - Defeat (picked player) with the message: You lose!
the event is basically when a demon hunter dies the conditions is making sure all of them are dead and the actions checks if they have any lives left and if they do it takes away a life and then revives the demon hunters. In the If then statement if you dont have any lives it ends the game.
Alright I hope this comes in help in your many map making adventures any questions or comments post below!
-Knight_of_Gods / Knight_of_Godz / Kog / God