• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

What the EFFFF

Status
Not open for further replies.
Level 22
Joined
Jun 23, 2007
Messages
3,242
Ok, i've got an ability that turns u invisible everytime u activate it (based on defend), it also drains 8 mana per second

i've got this:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(defend))
      • (Level of Camouflage (Real) for (Triggering unit)) Greater than 0
    • Actions
      • Unit Group - Add (Triggering unit) to CamoGroup
      • Unit - Add CamoSpellbook to (Triggering unit)
  • Untitled Trigger 002
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(undefend))
      • (Level of Camouflage (Real) for (Triggering unit)) Greater than 0
    • Actions
      • Unit Group - Remove (Triggering unit) from CamoGroup
      • Unit - Remove CamoSpellbook from (Triggering unit)
  • Untitled Trigger 003
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (Number of units in CamoGroup) Greater than 0
    • Actions
      • Unit Group - Pick every unit in CamoGroup and do (Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 8.00))
i have one other trigger, and it's to remove the unit if it doesnt have enough mana, but thats not part of the problem, guaranteed.

Ok, whenever i activate Camouflage, it instantly sets my mana to 0, and THEN it starts the -8 mana thing. help me please
 
Level 22
Joined
Jun 23, 2007
Messages
3,242
yes it can.
i figured it out, whenever i added the spellbook, for some unknown reason it set the mana to 0. so i just saved the units mana before adding the spellbook as a variable, and then when he used the spellbook, gave the variable amount of mana.
 
Status
Not open for further replies.
Top