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

Can triggers recognize boundary?

Status
Not open for further replies.
Level 5
Joined
Aug 11, 2008
Messages
86
Is it possible to make a trigger react to units in boundary? I've got a map with a jump/blink-like spell, and it's possible to use this spell to jump into boundary/areas I DON'T want the players to enter.

I've tried looking through triggers where different tiles are recognized, but I can't find the boundary tile anywhere. Is there a different way to get this done, or is it simply impossible?

All I need is a simple trigger which kills the unit entering the boundary or teleports it back to start, so any ideas?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
You detect if the unit leaves playable map area and then do whatever you want with it. Playable map area is defined as a rect within all boarder boundaries, so anything outside is in the map boundaries.

If you have custom boundaries pasted around the map, you will need to define custom rects which enclose them and use similar triggers to detect them going into the boundary. There is no way to detect if a point is in boundary/boarder as far as I am aware.
 
Level 5
Joined
Aug 11, 2008
Messages
86
Sorry, what's custom rects..? Do you mean regions? :huh:

Edit: And yes, I've got loads of custom boundary in the map. That's why I'm trying to prevent using regions and see if there's a simpler way the triggers can react to units entering any of the boundary-areas.
 
Level 5
Joined
Aug 11, 2008
Messages
86
Normally, yes. But I've got this jump/blink ability, which let's the units jump into any area they want. They can't move they're in the boundary, but they can wait for cooldown and then use the jump ability again to get out/cheat.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Sorry, what's custom rects..? Do you mean regions?
No I mean rects, as in GUI Regions. Not region which is something completely different and not available in GUI. Yes the names are confusing but when you start using JASS you will understand there is a big difference.

If the player orders you to blink outside the playable area then cancel the blink order.
 
Level 5
Joined
Aug 11, 2008
Messages
86
But if I put boundary in the middle of the map, will this count as not being in playable map area..? I thought only the edges of the map was not playable map area?
I'll test it anyway... :thumbs_up:

PS! I don't know shit about JASS... :xxd:
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
But if I put boundary in the middle of the map, will this count as not being in playable map area..? I thought only the edges of the map was not playable map area?
I'll test it anyway...
It obviously will not count. In GUI your best bet is to add other tests for these areas.

With JASS you could merge these rects into a single region as regions are cell based.
 
Status
Not open for further replies.
Top