• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Maze Map

Status
Not open for further replies.
Level 3
Joined
Jul 16, 2005
Messages
24
I am making a maze map and i want a trigger so that every time someone steps of the path they die.

But i treid to it with regoins but there must be an easy-er way to do it, instead of placing regoins at every single point of the map!

Credit to whoever helps me!
 
Level 7
Joined
Aug 5, 2005
Messages
218
I already posted this on another topic, but I'll post it again.
Code:
Lava Kill
    Events
        Time - Every 0.12 seconds of game time
    Conditions
    Actions
        Set tempGroup = (Units of type Runner)
        Unit Group - Pick every unit in tempGroup and do (Actions)
            Loop - Actions
                Set tempPoint = (Position of (Picked unit))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is alive) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Terrain type at tempPoint) Equal to Dungeon - Lava
                    Then - Actions
                        Unit - Kill (Picked unit)
                    Else - Actions
                Custom script:   call RemoveLocation(udg_tempPoint)
        Custom script:   call DestroyGroup(udg_tempGroup)
I use the variables tempPoint and tempGroup because it removes memory leaks, which cause lag. Make sure you also use the custom scripts to delete the variable values.
 
Level 3
Joined
May 31, 2005
Messages
26
Rage he knows how too do it he was jus asking is there a way too make it easier :p

Los_Tacos: I dont understand how this works...
When i made my maze map i did LOTS of regions...
Please explain what you said more >.<
 
Level 7
Joined
Aug 5, 2005
Messages
218
What is there to explain? The trigger is right in front of you, all you have to do it copy it. I'll show you where you can find each action.
Lava Kill
Events
Time - Every 0.12 seconds of game time
Conditions
Actions
Set tempGroup = (Units of type Runner) Set variable
Unit Group - Pick every unit in tempGroup and do (Actions) Unit group - Pick every unit in group and do actions
Loop - Actions
Set tempPoint = (Position of (Picked unit)) Set variable
If (All Conditions are True) then do (Then Actions) else do (Else Actions) If/Then/Else
If - Conditions
((Picked unit) is alive) Equal to True Boolean
Or - Any (Conditions) are true Or - Any conditions are true
Conditions
(Terrain type at tempPoint) Equal to Dungeon - Lava Terrain Type Comparison
Then - Actions
Unit - Kill (Picked unit) Unit - Kill
Else - Actions
Custom script: call RemoveLocation(udg_tempPoint) Custom script
Custom script: call DestroyGroup(udg_tempGroup) Custom script
 
Level 3
Joined
May 31, 2005
Messages
26
ahh ok now i understand ^^
But if i was too do this on my map, if you have played it you would notice theres frogs hidden off the paths, You gota find em all too get a diffrent ending >.< how would you do this?

I surpose you could make a new tile which looks the same but rename it, but i dunno how too do that stuff :p
 
Level 3
Joined
Jul 16, 2005
Messages
24
oOK

oK, I tryed this heaps but i was always stumped on this part:
Unit Group - Pick every unit in tempGroup and do (Actions) Unit group - Pick every unit in group and do actions
Loop-actions

Now my problem is that (actions) part it just comes up red so i can't click 'ok' and then i click on the red actions and try and find Loop-action.

Please help me! and please don't say i shouldn't even do this map because everyone has to start somewhere!

Thanks,
sam
 
Level 3
Joined
Jul 16, 2005
Messages
24
Ok..

Ok i get it with the varaible, but another problem!
arrrrgghhh Problems!!!!!!!!!!!

Anyway the custom script does not work because it says
invaild arugment type(interger)

this is the script
JASS:
call DestroyGroup(udg_tempgroup)
 
Level 7
Joined
Aug 5, 2005
Messages
218
Just by reading your post, it's obvious you've mixed up the variable types, because it says "Invalid argument type (integer)" when you're trying to destroy a unit group, not an integer. Are you sure "tempgroup" is a unit-group variable? And tempPoint should be a point variable.
 
Level 3
Joined
Jul 16, 2005
Messages
24
Thanks but..

Thanks alot i can see now(kinda),

But......

I changed the varaible to unit type and i want to do this

Unit Group - Pick every unit in tempGroup and do (Actions) Unit group - Pick every unit in group and do actions

but when i goto set the pick every unit in temp group i click on the red unit group and the varailbe thing is there but i does not appear on the varaibles drop down list!

other than that i think my trigger is right!

Thank you so much fro all your help,
Sam
 
Status
Not open for further replies.
Top