Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Here it goes:
Event---> Unit(your hero) starts casting an ability
Conditions---> Ability being cast equal to Defend
Action---> Set movement speed of (casting units) to 0
> Set (owner of ( triggering unit)) treat (all players) as allies
And then make another trigger.
Events---> Unit finishes casting an ability
Conditions---> Ability being finished equal to Defend
Actions---> Set movement speed of (triggering unit) to unit's default
> Set (owner of (triggering unit)) treat (All players) as enemies
I hope this will work, even i hadn't time to test it...is this what you were looking for?
aha...when your unit - maybe Footman - casts that Defend spell, other 12 units of same type create in line (6 units in right - Footman - 6units in left )?? If is this what are you looking for, than this trigger should do ( but you'll have to download WE Unlimited, it supports this type of trigger ):
Events---> Unit begins casting an ability
Conditions---> Ability being cast equal to Defend
Actions---> Create special effect wave using Footman model, facing 90 degrees, over distance you want
> Create special effect wave using Footman model, facing 270 degrees, over distance you want
This is only thing i can think of right now, but I will look into your matter deeper...
And this trigger will just make imaginary footmans, which will disappear in a second...
Sorry but right now I don't know how to make them stay
Why not just using 'Hold position'? That makes the unit stand still, but still attack if in range? >.<
defend on

Events


Unit - A unit Is issued an order with no target

Conditions


(String((Issued order))) Equal to defend

Actions


Set Temp_Point1 = (Position of (Triggering unit))


Unit - Create 1 Dummy for (Triggering player) at Temp_Point1 facing Temp_Point1


Unit - Order (Last created unit) to Orc Raider - Ensnare (Triggering unit)


Unit - Add a 1.00 second Generic expiration timer to (Last created unit)


Custom script: call RemoveLocation (udg_Temp_Point1)
defend off

Events


Unit - A unit Is issued an order with no target

Conditions


(String((Issued order))) Equal to undefend

Actions


Unit - Remove Defend buff from (Triggering unit)
Let me explain why set movespeed to 0 isn't work:
how fix it....
There got a minimum movespeed in unit editor,
even you set it to a value lower than minimum movespeed it will return as the minimum movespeed.
to fix it,
set the value to -1 but not 0,
if you set it to 0 it will follow the value in gameplay contant.
(advance > gameplay contant > movement > minimum movespeed)
(Download the map i have attached is the Easiest WAY)
Get a skill like Ensnare(Aens) (ablity > orc > unit > ensare) or (crtl+F) to find.
add it to a dummy unit.
defend on
Events
Unit - A unit Is issued an order with no target
Conditions
(String((Issued order))) Equal to defend
Actions
Set Temp_Point1 = (Position of (Triggering unit))
Unit - Create 1 Dummy for (Triggering player) at Temp_Point1 facing Temp_Point1
Unit - Order (Last created unit) to Orc Raider - Ensnare (Triggering unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_Temp_Point1)
defend off
Events
Unit - A unit Is issued an order with no target
Conditions
(String((Issued order))) Equal to undefend
Actions
Unit - Remove Defend buff from (Triggering unit)
you set the minimum movement speed to -1, but you also need a guard with trigger. like :ty, i try this now. Since i had already tried negative values and stuff, and nothing happened i realised i had to use a trigger. i might not have learnt anything now, but on the other hand i suck at triggers and i wouldn't have been able to make this on my own.
defend on

Events


Unit - A unit Is issued an order with no target

Conditions


(String((Issued order))) Equal to defend

Actions


Unit - Set (Triggering unit) movement speed to 0.00
yes, it a very simple trigger that without "wait" function...Ohh, and can this be used by multiple units at the same time?
Damn, it wont work. I checked all things a few times now. But how can i know that the trigger utilize the right ensnare?
You din't download my map?? i have done the skill in the map
https://www.hiveworkshop.com/forums/attachments/f98/44225d1230034065-make-unit-stationary-when-using-spell-defend.w3x
if you have check the trigger is prefectly same...
but you have many to check...
