• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Big question concerning 'leaves region', look inside

Status
Not open for further replies.
Level 8
Joined
Aug 1, 2008
Messages
420
Right, i got a duel going on. And if a person blinks outside the ring, it will teleport him into the center of the ring. But then when a unit dies (its a 2v2 duel) i asked for him to be respawned at GoodSpawn, which is outside the duel area (obviously) and so it teleports him back into the middle of the ring, thus not ending the duel.
I was thinking that i could just leave the units dead, then revive them at the end of the duel at the spawn, but i dont know how to do that.
Is there any other way? Or can someone show me how to do that ^^.
Thx in advance..
 
Level 6
Joined
Aug 19, 2006
Messages
187
if a unit dies it means not that the unit is "gone" it's still there and so it leaves the area if you revive it somewhere else.

so you need a condition. get a boolean variable array with false as start value and name it "Lost" or something like that. and if a player loses (his unit dies) set the variable for that player true. and then add the condition to your "teleport back" trigger (if lost[playernumber] equal to false then teleport back)
and at the end of the duel set it to false for every player again.

that should be an easy solution if you are not so advanced in triggering.
 
Level 3
Joined
May 1, 2009
Messages
24
or you could just make a second trigger.
Events- unit- a unit dies
conditions:
actions: trigger - turn off *no arena leave
trigger- turn off (this trigger)

* the no leave trigger
 
Level 11
Joined
Feb 14, 2009
Messages
884
Try this:

  • Events
    • Unit - A unit Dies
  • Conditions
  • Actions
    • Set IsDead(Owner of (Triggering unit)) = True
    • Set GoodPoint = (Center of (RevivalArea))
    • Hero - Instantly revive (Triggering unit) at GoodPoint, Show revival graphics
    • Custom script: call RemoveLocation(udg_GoodPoint)
And this prevents exiting your duel region.

  • Events
    • Unit - A unit leaves DuelArea
  • Conditions
    • IsDead(Owner of (Triggering unit)) = False
  • Events
    • Set ReturnLocation = (Center of (DuelArea)
    • Unit - Move (Triggering unit) instantly to ReturnLocation
    • Custom script: call RemoveLocation(udg_ReturnLocation)
 
Level 11
Joined
Feb 14, 2009
Messages
884
Yes, but then you have to create 4 regions, and they have to be large enough to catch blinkers. Maybe it isn't convenient, as he may need the surrounding area.
 
Level 8
Joined
Aug 1, 2008
Messages
420
Thanks, will try now. Will get back to you to say if it works.
What variable is 'IsDead'? Because i cant find the first action trigger.
 
Level 8
Joined
Aug 1, 2008
Messages
420
I cant find Set IsDead(Owner of (Triggering unit)) = True
If its boolean it wont come up (Owner of (triggering unit)) = True.

Especially the last bit.
Is it an array?...
 
Level 11
Joined
Feb 14, 2009
Messages
884
Make IsDead an Array (tick the array button in the variable creation window) and it will work.
 
Level 11
Joined
Feb 14, 2009
Messages
884
  • Set IsDead(index) = Value
  • Click (index).
  • Go to "Player - Player number".
  • After that, select "Owner of unit" from the dropdown list.
  • Finally, select "Event response - Triggering unit".

Hope you 'll find it this time :)
 
Level 8
Joined
Aug 1, 2008
Messages
420
So it actually looks like this? xD

  • Set IsDead[(Player number of (Owner of (Triggering unit)))] = True
It works, thx. +rep.
Solved!
 
Status
Not open for further replies.
Top