SOLVED! Thank you Yoshii
I'm trying to make a spell which, when used, will start to drain mana and will make the unit invisible + can pass through units but not walls. I based it on wind walk (one to turn on and another to turn off). It works well but it has one problem.... when I turn it off I would like it to have a cooldown... which it doesn't have. I did try to use the spell instantly after it's turned off and remove the wind walk buff. After that the cooldown worked fine, but the wind walk buff (the invisibility) doesn't get removed after it's cast. And I also tried using waits.
The spell should also have also backstab dmg depending on the level.
The triggers:
1. When Cloak is turned on
2. When Cloak is turned off
2. Cloak mana drain
I didn't even try to make the cooldown work in this trigger.
For some retarded reason, which I have forgotten by now, I didn't try the immolation method (for mana drain).
If you can get it working then kudos to you.
I'm trying to make a spell which, when used, will start to drain mana and will make the unit invisible + can pass through units but not walls. I based it on wind walk (one to turn on and another to turn off). It works well but it has one problem.... when I turn it off I would like it to have a cooldown... which it doesn't have. I did try to use the spell instantly after it's turned off and remove the wind walk buff. After that the cooldown worked fine, but the wind walk buff (the invisibility) doesn't get removed after it's cast. And I also tried using waits.
The spell should also have also backstab dmg depending on the level.
The triggers:
1. When Cloak is turned on
Trigger:
- CloakOn
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Cloak (On)
- Actions
- Unit - Remove Cloak (On) from (Triggering unit)
- Unit - Add Cloak (Off) to (Triggering unit)
- Unit Group - Add (Triggering unit) to CloakedUnits
- Events
2. When Cloak is turned off
Trigger:
- CloakOff
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Cloak (Off)
- Actions
- Trigger - Turn off CloakOn <gen>
- -------- --------
- Unit - Add Cloak (On) to (Triggering unit)
- Unit - Remove Cloak (Off) from (Triggering unit)
- Unit Group - Remove (Triggering unit) from CloakedUnits
- -------- Fix Cooldown --------
- Unit - Order (Triggering unit) to Orc Blademaster - Wind Walk
- Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + 50.00)
- -------- Turn Cloak Off (again -.-)--------
- Unit - Remove Wind Walk buff from (Triggering unit) THE PART THAT DOESN'T WORK
- -------- --------
- Trigger - Turn on CloakOn <gen>
- Events
2. Cloak mana drain
I didn't even try to make the cooldown work in this trigger.
Trigger:
- CloakManaDrain
- Events
- Time - Every 0.50 seconds of game time
- Conditions
- Actions
- Unit Group - Pick every unit in CloakedUnits and do (Actions)
- Loop - Actions
- Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 3.50)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Mana of (Picked unit)) Less than 1.00
- Then - Actions
- Unit - Remove Cloak (Off) from (Picked unit)
- Unit - Add Cloak (On) to (Picked unit)
- Unit Group - Remove (Picked unit) from CloakedUnits
- Unit - Remove Wind Walk buff from (Picked unit)
- Else - Actions
- If - Conditions
- Loop - Actions
- Unit Group - Pick every unit in CloakedUnits and do (Actions)
- Events
For some retarded reason, which I have forgotten by now, I didn't try the immolation method (for mana drain).
If you can get it working then kudos to you.