Cloak Spell :)

Mr Joke

New Member
Reaction score
2
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
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


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>


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


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. :D
 

Yoshii

New Member
Reaction score
74
as far as I know its not possible to remove the windwalk buff; nothing will remove it No silence, spell steal, dispel etc can do it unlike invisibility that orb can remove it if i recall.
 

Mr Joke

New Member
Reaction score
2
Actually it is removed in the CloakDrainMana trigger as I didn't try to apply the cooldown there (yet).
 

Mr Joke

New Member
Reaction score
2
Ya and you said it's impossible to remove the buff which I did in trigger no. 3. (It works)

EDIT: In other words, removing the buff works in the third trigger but not in the first one.
 

Yoshii

New Member
Reaction score
74
Ya and you said it's impossible to remove the buff which I did in trigger no. 3. (It works)

EDIT: In other words, removing the buff works in the third trigger but not in the first one.
I opened my WE to test what your trying to do Im on the part about the cooldown and lets see

you could make the spell have infinite CD(or a very long one) and when the unit has the shield off to wait some time before reseting the ability cooldown.

the on/off part is a pain compare to using an ability such as immolation.
 

Mr Joke

New Member
Reaction score
2
Sorry I if i understood you correctly then it's not what I'd like it to do. Then the cooldown effect would be really slow on the ability icon and it wouldn't show the real cooldown?
I have a test map... now if I could find a way to upload it.

View attachment 33177

EDIT: I had an epiphany and the pink fairy unicorn told me to pick every unit in playable map area and remove buff from all of them and it WORKED!

Only it still turns invisible for a very short time which is kinda ugly.
 

Yoshii

New Member
Reaction score
74
Sorry I if i understood you correctly then it's not what I'd like it to do. Then there wouldn't show the cooldown effect on the ability icon?

I have a test map... now if I could find a way to upload it.

View attachment 33177

well i did it abit dif but ya similar result; the difference with infinite coooldown reseting is that when you turn it off you see the cooldown being high but 5sec later its reseted unlike yours where it doesnt show anything.I dont think it can be done better than have infinite cooldown and reseting it because

you are using windwalk; if the cooldown is lower than the duration then the player can use it infinite
if the duration is lower than the cooldown it could work out but since there is not set time how long a player can stay "cloak" (only limited by mana) then were pretty much stuck.

Its def working for the cant use again part but the visual wont go with it for the above reason as there is no trigger "Set cooldown to x"

edit: you got it working? can I see ?
 

Mr Joke

New Member
Reaction score
2
It looks kinda retarded but it's the only way I got it working...

Trigger:
  • CloakOff2
    • Events
      • Unit - A unit Begins casting 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)
      • Wait 0.01 seconds
      • -------- Turn Cloak Off --------
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Remove Wind Walk buff from (Triggering unit)
      • -------- --------
      • Trigger - Turn on CloakOn <gen>


What do you think?
 

Yoshii

New Member
Reaction score
74
if more than 1 person have the ability and turn it off it remove the buff for all player in map.
and why triggering unit if you did pick all unit? Its definitely weird looking your pick all unit and removing buff of triggering unit
 

Mr Joke

New Member
Reaction score
2
I know it's wierd. It's the ugliest code I've ever seen, but it's the ONLY way I got it working.

EDIT1: So I need to make it MPI or atleast make the code better for starters.

EDIT2:

Trigger:
  • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to (Unit-type of (Triggering unit)))) and do (Actions)
    • Loop - Actions
      • Unit - Remove Wind Walk buff from (Picked unit)


This didn't work

Trigger:
  • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Blood Mage)) and do (Actions)
    • Loop - Actions
      • Unit - Remove Wind Walk buff from (Picked unit)


Didn't work either
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top