loc1 and loc2 are mandatory variables (they're variables of type "point") to prevent memory leaks.
- Untitled Trigger 001
- Events
- Unit - A unit enters Region 000 <gen>
- Conditions
- (Hero level of (Triggering unit)) Less than 15
- Actions
- Set loc1 = (Position of (Triggering unit))
- Set loc2 = (loc1 offset by 150.00 towards ((Facing of (Triggering unit)) + 180.00) degrees)
- Unit - Move (Triggering unit) instantly to loc2
- Custom script: call RemoveLocation(udg_loc1)
- Custom script: call RemoveLocation(udg_loc2)
- Custom script: set udg_loc1 = null
- Custom script: set udg_loc2 = null
The trigger could be further improvized by using unit variable, saving the triggering unit into the variable and then referencing the variable instead of using "triggering unit" all the time.
What the trigger does is if unit enters region000 and its level is less than 15, then the unit is moved back by 150 units.
loc1 and loc2 are mandatory variables (they're variables of type "point") to prevent memory leaks.
- Untitled Trigger 001
- Events
- Unit - A unit enters Region 000 <gen>
- Conditions
- (Hero level of (Triggering unit)) Less than 15
- Actions
- Set loc1 = (Position of (Triggering unit))
- Set loc2 = (loc1 offset by 150.00 towards ((Facing of (Triggering unit)) + 180.00) degrees)
- Unit - Move (Triggering unit) instantly to loc2
- Custom script: call RemoveLocation(udg_loc1)
- Custom script: call RemoveLocation(udg_loc2)
- Custom script: set udg_loc1 = null
- Custom script: set udg_loc2 = null
The trigger could be further improvized by using unit variable, saving the triggering unit into the variable and then referencing the variable instead of using "triggering unit" all the time.
What the trigger does is if unit enters region000 and its level is less than 15, then the unit is moved back by 150 units.
Haha I once abused this trigger in one of War3 RPG, it's called The Black Road, it uses the same trigger to prevent unit from entering that zone.
How did I abuse it ?
Simple, by using knockback spell that causes my unit to be thrown backwards while I was facing the other way around.
So when the system triggers, my direction + 180 = Entering the zone, very fun indeed
Luckily TBR creator only cover some small portion of the map with the region (only the entrance).
If they covered whole region with that system, my unit won't be able to move at all, constantly being pushed by the trigger
Noooooi changed it a bit and when ur lvl is too low u teleport instant to middle of region