• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help! Toggleable Windwalk which drains mana

Status
Not open for further replies.
Level 4
Joined
May 1, 2004
Messages
59
Hi everyone, basically what i tried to do is an invisibility which can be turned on and off, and drains mana just like Immolation. each level decreases the mana drained. The unit is able to attack while invisible, but no speed increase or backstab damage like windwalk.

I have tried base the spell on Immolation, then add the Ghost ability (which makes the unit invisible but can still attack) when it is turned on. but i have trouble with disabling invisibility when the mana of the unit is less than required, if you know what i mean.

It would be nice if you guys can help me out with a working sample either in GUI, JASS or JESP, but please try not to involve vJASS or JASSHelper alike. THanks alot!

PS: I named the ability Wind Cloak ;)
 
Level 4
Joined
May 1, 2004
Messages
59
Ok, this is the functions i have now, plz check for me:

-------------------------------------------------------------------------------------

Add invisibility
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Wind Cloak
Actions
Unit - Add Ghost to (Triggering unit)
Set CloakedUnit[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
Trigger - Turn on Remove invisibility <gen>

-------------------------------------------------------------------------------------

Remove invisibility
Events
Time - Every 0.06 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(CloakedUnit[(Player number of (Owner of (Triggering unit)))] has buff Wind Cloak ) Equal to False
Then - Actions
Unit - Remove Ghost from CloakedUnit[(Player number of (Triggering player))]
Set CloakedUnit[(Player number of (Owner of (Triggering unit)))] = No unit
Trigger - Turn off (This trigger)
Else - Actions
Do nothing

-------------------------------------------------------------------------------------
 
Level 22
Joined
Jun 24, 2008
Messages
3,050
Ok, this is the functions i have now, plz check for me:

-------------------------------------------------------------------------------------

  • Add invisibility
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Wind Cloak
    • Actions
      • Unit - Add Ghost to (Triggering unit)
      • Set CloakedUnit[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Trigger - Turn on Remove invisibility <gen>
-------------------------------------------------------------------------------------
  • Remove invisibility
    • Events
      • Time - Every 0.06 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CloakedUnit[(Player number of (Owner of (Triggering unit)))] has buff Wind Cloak ) Equal to False
        • Then - Actions
          • Unit - Remove Ghost from CloakedUnit[(Player number of (Triggering player))]
          • Set CloakedUnit[(Player number of (Owner of (Triggering unit)))] = No unit
          • Trigger - Turn off (This trigger)
        • Else - Actions
-------------------------------------------------------------------------------------

Like that.

Yea, that should do fine. Remember to remove the 'Do nothing', it just fills.
Besides, you could add some critical strike to him, while he is stealthed, to make it more windwalk-ish.
 
Level 4
Joined
May 1, 2004
Messages
59
thx guys for the suggestions. after twinkling abit the spell is finally functionable. the previous functions i post didnt work because of the unit array. i changed the variable simply to CloakedUnit, and the whole thing worked. but im not sure whether it would be MUI or not now...
 
Status
Not open for further replies.
Top