I'm using this trigger to hide then unhide some units.
I haven't tested yet but this will fail if other item is used while units are hidden. Any idea on how avoid that?
Ghost Bane
Events
Unit - A unit Uses an item
Conditions
(Item-type of (Item being manipulated)) Equal to Ghost Bane
Actions
Unit Group - Pick every unit in (Units within 800.00 of (Position of (Hero manipulating item))) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Picked unit) is A Hero) Equal to True) and (((Picked unit) is A flying unit) Equal to True)
Then - Actions
Set Ghost_Temp = (Picked unit)
Unit - Move Ghost_Temp instantly to ((Owner of Ghost_Temp) start location)
Unit - Hide Ghost_Temp
Game - Display to (Player group((Owner of Ghost_Temp))) for 55.00 seconds the text: You will return soon...
Unit Group - Add Ghost_Temp to Ghost_Bane
Set Ghost_Temp = No unit
Else - Actions
Do nothing
Wait 60.00 seconds
Unit Group - Pick every unit in Ghost_Bane and do (Unit - Unhide (Picked unit))
Unit Group - Remove all units from Ghost_Bane
I haven't tested yet but this will fail if other item is used while units are hidden. Any idea on how avoid that?