- Joined
- Feb 11, 2016
- Messages
- 249
Greetings. I made trigger and want it without memory leak if possible. I want to use same variables in multiple triggers. Also I want to make this works multiple times at once when needed.
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Transition
Actions
Set Vracanje_mesto = (Position of (Casting unit))
Unit - Create 1 Freza Madjija for (Owner of (Casting unit)) at Vracanje_mesto facing (Facing of (Casting unit)) degrees
Custom script: call RemoveLocation (udg_Vracanje_mesto)
Set Freza_Madjija = (Last created unit)
Unit - Order Freza_Madjija to Human Sorceress - Invisibility (Casting unit)
Wait 0,40 game-time seconds
Unit - Remove Freza_Madjija from the game
I know that I should use timer instead of wait but I will do it one day, not now.
In advice thank You <3.
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Transition
Actions
Set Vracanje_mesto = (Position of (Casting unit))
Unit - Create 1 Freza Madjija for (Owner of (Casting unit)) at Vracanje_mesto facing (Facing of (Casting unit)) degrees
Custom script: call RemoveLocation (udg_Vracanje_mesto)
Set Freza_Madjija = (Last created unit)
Unit - Order Freza_Madjija to Human Sorceress - Invisibility (Casting unit)
Wait 0,40 game-time seconds
Unit - Remove Freza_Madjija from the game
I know that I should use timer instead of wait but I will do it one day, not now.
In advice thank You <3.