• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Trigger Channeling Help +REP ~

Status
Not open for further replies.
long wait may cause your trigger to leak.

  • turn off trigger
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to YOURABILITY
    • Actions
      • Trigger - Turn off (YourManaRestorationTrigger)
 
it is possible with using a hashtable and a timer. your base ability is cannibalize with 0 hp heal.
store the unit in the hashtable and start the timer.
in the tirgger where you started the timer you make a wait for 20 seconds and when the time is over you flush the vars and destroy the timer.
in the timer actions you start increasing the mana value of the stored unit you loaded IF the current order of the unit is equal to the aciton cannibalize (or channeling, i don't know with cannibalize) AND a stored boolean is TRUE. if the IF-THEN_ELSE-function returns one time a false, you must turn the stored boolean to false and save it, so the mana heal will never trigger again if the unit stopped cannibalizing.
 
long wait may cause your trigger to leak.

  • turn off trigger
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to YOURABILITY
    • Actions
      • Trigger - Turn off (YourManaRestorationTrigger)

this should work
 
EDIT:It should work but not exactly what i need.

Now i've

  • Initial
    • Events
      • Unit - A Unit Begins channeling an ability
    • Conditions
      • (Ability Being Cast) Equal to Feed
    • Actions
      • Unit - Set mana of casting unit to mana of casting unit + 3.00



But i need it to keep + 3 mana when the unit is feeding on corpse,but stops when it stops feeding on corpse.how do i do that?
 
somthing like this
  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Cannibalize
    • Actions
      • Set unit[1] = (Casting unit)
      • Trigger - Turn on Untitled Trigger 002 <gen>
  • Untitled Trigger 002
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Set mana of unit[1] to ((Mana of unit[1]) + 20.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Mana of unit[1]) Equal to (Max mana of unit[1])
        • Then - Actions
          • Unit - Order unit[1] to Stop
          • Trigger - Turn off (This trigger)
        • Else - Actions

  • Untitled Trigger 003
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Cannibalize
    • Actions
      • Trigger - Turn off Untitled Trigger 002 <gen>
 
well a very easy solution (not MUI and perfect!):
Store the unit in a variable, then make
a) a LOOp (JASS)
or
b) (GUI) make a wait of about 0.25sec
then check what order the unit is currently doing (if you don't know how tell me!)
if the order is equal to the cannibalize thing (or channeling, i don't know)
then add (MANA_PER_SEC / 4) to unit
if the order is not equal : Skip remaining actions)

then copy & paste the wait & actions for as long as cannibalize can/should last at max and at the last point make a stop unit order, so that the unit stops cannibalizin (if needed)

greetings
 
now i would to that in GUI with a timer.
unit casts sleep -> add unit to some group

next trigger:
every x seconds of game time
pick every units in group some gropu and do actions
if mana of picked unit > 1 then
heal
else
remove buff of sleep (to wake up)
remove unit from group

just what you like to do.
 
try somthing like this
  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Sleep
    • Actions
      • Set unit[1] = (Target unit of ability being cast)
      • Trigger - Turn on Untitled Trigger 002 <gen>
  • Untitled Trigger 002
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Wait until ((unit[1] has buff Sleep) Equal to True), checking every 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Integer((Max life of unit[1]))) Not equal to (Integer((Life of unit[1])))
        • Then - Actions
          • Unit - Set mana of unit[1] to ((Mana of unit[1]) - 40.00)
          • Unit - Set life of unit[1] to ((Life of unit[1]) + 40.00)
        • Else - Actions
          • Unit - Order unit[1] to Stop
          • Trigger - Turn off (This trigger)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Integer((Mana of unit[1]))) Equal to 0
              • (unit[1] has buff Sleep) Equal to False
        • Then - Actions
          • Unit - Order unit[1] to Stop
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Status
Not open for further replies.
Back
Top