Not able to touch a certain spot.

xfirenzx

New Member
Reaction score
7
I wanted it so when a unit touches a certain type of terrain they will die. This is my trigger so far.

Code:
Dont Step There
    Events
        Unit - A unit owned by Player 1 (Red) Is issued an order targeting a point
    Conditions
        (Terrain type at (Position of (Triggering unit))) Equal to Dalaran - Trim Grass
    Actions
        Unit - Kill (Triggering unit)

Everything works except when I stand on the grass I don't die only when I'm already standing on it and I make my unit move.

Is there an event that makes it so when you step on the grass you die instead of what happens to me?
 

cowmenace

New Member
Reaction score
22
event
periodic event every .03 seconds

no conditions

actions
pick all units in playable map area
if-then-else
if terrain type at position of picked equal to (terrain type you want unit to die in) then
then - actions
kill picked unit
else -actions
do nothing

in your trigger, it says when a unit is told to move somewhere, if the terrain under the unit is trimmed grass then kill the unit. This is why when you order a unit to move when it is on trimmed grass it dies, instead of it dieing when it steps on the grass.

If you want to kill the unit if the player orders it to move on the grass, not when it steps on the grass then change conditions of your trigger to terrain type at target point of issued order equal to trimmed grass
 

xfirenzx

New Member
Reaction score
7
Thanks.

+rep

Edit: sorry cant give any to you AceHart. I have to spread some around first.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top