HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Limit Area

07-17-2007, 02:40 PM#1
sas_Skorpion
Hello I've been having a problem with the collision ...

I made a Ghost unit that is supposed to walk trough trees and i did that by turning the collision off but then the units are also free to walk outside the arena trough walls ... does anybody know a good way to prevent this ?
07-17-2007, 05:42 PM#2
CommanderZ
Several months ago I was trying to make similiar ability (I was calling it "forestwalk"), but without success.

If your arena is square or rectangle shaped you can easily prevent them from leaving arena with trigger (unit leaves region->move to according coord close to the border).

You can also remove pathing from trees, this will make them uncollidable with units.
07-17-2007, 05:48 PM#3
blu_da_noob
You could make it a flying unit and using flying pathing blockers.
07-17-2007, 05:49 PM#4
sas_Skorpion
If you know how to do it can u make a trigger like that ?
A unit leaves Region
Unit type equal to NVM THIS
Move Unit -> the thing u said ...
07-17-2007, 08:00 PM#5
maximilianx
i came up with a simple solution to this a while back and it worked just fine, if you put a different terrain tile under all of the trees on your map, one you don't use anywhere else, then you can check units for the ability, and if they are standing on that terrain type, turn collision off, otherwise turn it on. it worked alright when i tried it.
07-17-2007, 10:18 PM#6
sas_Skorpion
Too sad i can't do that
07-17-2007, 10:54 PM#7
TheSecretArts
Unit Leaves Region Arena<gen>
then:
Take Triggering unit and move it to center of Arena<gen>
07-17-2007, 11:28 PM#8
maximilianx
or..even better than moving him to the center, move him like 100 towards the center of the arena, instead of just the center cuz that's sloppy.
07-17-2007, 11:38 PM#9
sas_Skorpion
And how the hell do that ... i got 4 sides of the arena plus 4 corners ... check out my project maybe you'll get the idea of what im speaking
07-18-2007, 12:38 AM#10
TheSecretArts
make two regions
encased in code tags to prevserve whitespace
Code:
   
 _
|_|
the middle point is where the two regions intersect and just handle a trigger like,
Trigger:
Region
Collapse Events:
Unit Leaves Region R1<gen>
Collapse Actions:
Collapse If (conditions) equal true, then do (Then) else do (Else)
Unit is in region R1<gen> is false AND Unit-Type is equal to <selector> is false
Collapse Actions (Then):
Unit - Move unit to center of R1<gen>
07-18-2007, 02:50 AM#11
sas_Skorpion
I thought about that but this is an arena i can't just teleport units to the middle it can be used as a glitch to escape bad situations ...
07-18-2007, 06:07 AM#12
PenguinEmperor
How about instead of teleporting, you could just order a unit to move back into the arena when they leave it??
07-18-2007, 07:08 AM#13
maximilianx
because if you order a unit to move outside of the arena a lot then eventually you will evade the trigger ordering him to move.
07-18-2007, 11:44 AM#14
CommanderZ
Why wouldn't work the thingy with removing tree pathing map? I sense it is exactly what you are looking for.
07-18-2007, 12:59 PM#15
sas_Skorpion
Because this is an arena of normal heroes only when a team is defeated they become ghosts ...