• 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.

Invisibility costing mana per second

Status
Not open for further replies.
Level 4
Joined
Apr 23, 2011
Messages
88
So, I want to make a spell through basic triggers that turns a unit invisible--but only if the unit has the mana to continue to power the invisibility ability. I also want the unit to have the ability to turn OFF the invisibility. Lastly, while invisible, the unit's walking speed should increase.

(Or can you do this through an existing spell?)


I imagine something like...

1. event: unit begins the effect of an ability
2. condition: ability = Invisibility

3. change unit transparency to %50
4. Make unit have faster walking speed
5. Make unit "invisible" (if that's some property you can add to a unit through triggers
6. save level of Invisibility in integer variable
7. Get rid of Invisibility
8. Give unit Reappear (at level of variable)

9. If mana of casting unit less than or equal to 0, switch all off/back
10. If unit begins effect of ability and ability = Reappear, switch all off/back


THOUGHTS?
 
Level 7
Joined
May 18, 2010
Messages
264
what u ask here is this
  • Mana per second
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Wind Walk
    • Actions
      • Trigger - Turn on Mana Check <gen>
      • Set WindWalkCaster = (Triggering unit)
  • Mana Check
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
      • (Mana of WindWalkCaster) Less than or equal to (<=) 11.00
    • Actions
      • Unit - Set mana of WindWalkCaster to ((Mana of WindWalkCaster) - (3.00 + (7.00 x (Real((Level of Wind Walk for WindWalkCaster))))))
      • U need to turn off the windwalk... make spell able to turn off
      • And turn off this trigger ofc then
U can make if then else for the Conditions to clear ani Leaks
 
Level 4
Joined
Apr 23, 2011
Messages
88
Okay, your first trigger is simple and I get it. Good idea.

Now, for the second trigger. How about?:

Event:
1. Every .5 secs

Conditions:
NONE

Actions:
1. Set mana of unit who casted wind walk (saved with unit variable) to (mana of unit whho casted wind walk MINUS 2)

2. If mana of unit who casted wind walk less than or equal to 0, do...
A. Turn off wind walk (QUESTION 1: HOW DO I MAKE THIS ACTION AND HOW DO I EDIT WIND WALK APPROPRIATELY?)
B. Turn this trigger off


QUESTION 2: I ALSO need to be able to turn off wind walk while in it by clicking a button. Anything else I need to do to wind walk in object editor in order to be able to do this?


Thanks much for your help!
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
QUESTION1:
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (WindWalkCaster has buff Windwalk) Equal to False
      • Then - Actions
        • Trigger - Turn off (This trigger)
      • Else - Actions
Use "IF/THEN/ELSE MULTIPLE FUNCTION" Action
Although, what tw3ye gave you is not a MUI trigger, but that you doesn't seem to care about that right ? Haha
 
Level 4
Joined
Apr 23, 2011
Messages
88
Right, I don't care about MUI (because I don't know how to use it or what it is, really)

But I don't see how your trigger turns it off when he gets to zero mana, defskull.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
QUESTION2:
A test map is attached
You got Wind Walk Cancel ability (un-learnable) and normal Wind Walk Ability (learnable)

QUESTION1:
You can put an "And" check for both WindWalkCaster's buff AND mana if 0, breaks out the invisibility by forcing the unit to cast that "Wind Walk Cancel" ability
The order string is roar, therefore force the unit to use this command:
  • Unit - Order WindWalkCaster to Night Elf Druid Of The Claw - Roar
That will cancel out the invisibility of that unit
 

Attachments

  • WindWalk Cancel.w3x
    16.6 KB · Views: 57
Level 4
Joined
Apr 23, 2011
Messages
88
That works. I'm going to make the triggers so that it's the "same" button, too.

Thanks!
 
Status
Not open for further replies.
Top