• 🏆 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!

[Trigger] Making the unit can't leave the arena

Status
Not open for further replies.
Level 12
Joined
Mar 23, 2008
Messages
942
I'm doing a kind of hero arena with animes characters, you can choose between some arenas in the begin of the game, but I don't want they to be able to leave these arenas with flying units or teleport or anything like that.

I want to make a trigger that detect if a unit leaves the arena, and them blink them to the last point they was in the arena, because if I just teleport them to the middle, they can use that to do a direct attack from bases, if I teleport them to bases, they can use that to flee. So I want to teleport them to the last location inside arena before they leave it.

Someone can help-me?
 
Level 12
Joined
Mar 23, 2008
Messages
942
You'll need a system in such case which will propably cause the game heavier a bit (as far as i think) which detects every unit location every X seconds, when the unit leaves he will teleport him to the location he was in the X second.
>.<

I don't think this is a good ideia...
Anyone know how to do a trigger that see the future?

Edit: I Had a great ideia! Take the angle of the unit and the center of the arena and them start moving the unit in the direction of the arena until it reaches the arena! (Still needs some seconds of move after reach because can stuck on walls)
But I don't know how to do that trigger...
 
Level 2
Joined
Apr 17, 2008
Messages
20
isnt u can place some invisible path blocker around the arena with stats that block air unit? and if someone try to blink outside arena, just move that unit to random position in arena. depend on luck, that unit will pop in his own base or enemy base or middle of arena, -Blink with your own risk-

or just simply put them to enemy base, so if they blink = suicide, WAHAHAHA
 
Level 19
Joined
Aug 16, 2007
Messages
881
It's simple:

  • How To Do a Simple UnLeave Trigger
    • Events
      • Unit - A unit enters DONOTLEAVE <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set point[1] = (Position of (Triggering unit))
      • Set point[2] = (point[1] offset by 100.00 towards ((Facing of (Triggering unit)) + 180.00) degrees)
      • Unit - Move (Triggering unit) instantly to point[2]
      • Custom script: call RemoveLocation(udg_point[1])
      • Custom script: call RemoveLocation(udg_point[2])
Hope this works :)
 
Level 12
Joined
Mar 23, 2008
Messages
942
I didn't understand that part:

Set point[2] = (point[1] offset by 100.00 towards ((Facing of (Triggering unit)) + 180.00) degrees)

Isn't easier to just move the unit 100 points toward the center of the region each halfsecond?

[-- This is what I'm using... with no actions xD --]
Events:
Unit - A unit leaves Mystic Fountain <gen>
Conditions:
Arena is equal to Mystic Fountain
 
Level 12
Joined
Mar 23, 2008
Messages
942
this: (point[1] offset by 100.00 towards ((Facing of (Triggering unit)) + 180.00) degrees)

What it does?

And the event cannot be that because I have more than one arena, and its impossible to do a region that covers all the blank spaces, its easier just to make a leaves region.

Edit: I got it, the enter event will loop each time the unit still in the region because it will make it enter again and again xD
But its still not possible to do a region covering all the blank areas...
 
Status
Not open for further replies.
Top