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

[Trigger] autocast ability

Status
Not open for further replies.
Level 4
Joined
Mar 15, 2008
Messages
71
If you want a trigger to be executed when some1 is using an auto-cast ability like orb spells (poison/cold arrows) You should make 3 triggers
1st : enable the "2nd trigger" when a unit is issued a command to turn on auto-casting of an ability(there are special orders for every auto-cast abilities )
2nd trigger: when a unit attacks,check if it is the unit that you turned the auto-cast on
3rd trigger : when the unit is issued an order to turn off the auto-cast of an ability disable the "2nd trigger"
 
Level 3
Joined
Aug 20, 2008
Messages
40
If you want a trigger to be executed when some1 is using an auto-cast ability like orb spells (poison/cold arrows) You should make 3 triggers
1st : enable the "2nd trigger" when a unit is issued a command to turn on auto-casting of an ability(there are special orders for every auto-cast abilities )
2nd trigger: when a unit attacks,check if it is the unit that you turned the auto-cast on
3rd trigger : when the unit is issued an order to turn off the auto-cast of an ability disable the "2nd trigger"

can you please show example of that?
 
Level 4
Joined
Mar 15, 2008
Messages
71
  • Here ya go
    • Events
      • Unit - A unit is issued an order with no target
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued Order) equal to (Order(slowon))
          • (Issued Order) equal to (Order(slowoff))
    • Actions
      • If (All Conditions are True)then do(Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued Order) equal to (Order(slowon))
        • Then - Actions
          • Unit Group - Add (Ordered Unit) to AutoCastGroup
        • Else - Actions
          • Unit Group - Remove (Ordered Unit) to AutoCastGroup
  • w00t
    • Events
      • Unit - A unit is issued an order targeting an object
    • Conditions
      • ((Ordered Unit) is in AutoCastGroup) equal to True
      • (Issued Order) equal to(Order(attack))
      • ((Target unit of issued order) belongs to an enemy of (Owner of (Ordered Unit))) equal to True
    • Actions
      • Unit - Order (Ordered Unit) to Human Sorceress - Slow (Target unit of issued order)
I changed my idea a lil bit :)
In these triggers I'm using the "slowon" "slowoff" "slow" orders,the thing is that you have to set your spell to have these orders in object editor,I think you know how to do this ^^.Hope this helps
 
Level 3
Joined
Aug 20, 2008
Messages
40
  • Here ya go
    • Events
      • Unit - A unit is issued an order with no target
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued Order) equal to (Order(slowon))
          • (Issued Order) equal to (Order(slowoff))
    • Actions
      • If (All Conditions are True)then do(Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued Order) equal to (Order(slowon))
        • Then - Actions
          • Unit Group - Add (Ordered Unit) to AutoCastGroup
        • Else - Actions
          • Unit Group - Remove (Ordered Unit) to AutoCastGroup
  • w00t
    • Events
      • Unit - A unit is issued an order targeting an object
    • Conditions
      • ((Ordered Unit) is in AutoCastGroup) equal to True
      • (Issued Order) equal to(Order(attack))
      • ((Target unit of issued order) belongs to an enemy of (Owner of (Ordered Unit))) equal to True
    • Actions
      • Unit - Order (Ordered Unit) to Human Sorceress - Slow (Target unit of issued order)
I changed my idea a lil bit :)
In these triggers I'm using the "slowon" "slowoff" "slow" orders,the thing is that you have to set your spell to have these orders in object editor,I think you know how to do this ^^.Hope this helps

thanks
 
Level 3
Joined
Aug 20, 2008
Messages
40
So,is it working?

  • w00t
    • Events
      • Unit - A unit is issued an order targeting an object
    • Conditions
      • ((Ordered Unit) is in AutoCastGroup) equal to True
      • (Issued Order) equal to(Order(attack))
      • ((Target unit of issued order) belongs to an enemy of (Owner of (Ordered Unit))) equal to True
    • Actions
      • Unit - Order (Ordered Unit) to Human Sorceress - Slow (Target unit of issued order)
this not working...
 
Level 4
Joined
Mar 15, 2008
Messages
71
omg...Do you know anything about WE? did you set the order strings in the object manager in for the spell you want to be autocastable?
Losing my patience with all these explanations that I take 20minutes to make and at the end ppl use them for nothing cause they know shit about triggers and editing :/
 
Level 3
Joined
Aug 20, 2008
Messages
40
If it's an arrow ability, then you need to use the Unit is Attacked (or preferably damaged, if you feel like setting up damage detect) event. You also need to check to make sure that they have enough mana to trigger it.

can you show same example?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Then, the is no need for such complicated triggering...
Just use searing arrows as a base ability, with 0 dmg.
Then make a trigger, Unit begins the effect of an ability
Check if it is your ability.
 
Level 6
Joined
Jan 27, 2007
Messages
208
If it's an arrow ability, then you need to use the Unit is Attacked (or preferably damaged, if you feel like setting up damage detect) event. You also need to check to make sure that they have enough mana to trigger it.

my auto cast (arrow based) ability finally work! But, it still triggered even caster unit dont have mana required...so i try to detect hero mana....this is my trigger...
  • Detect Damage
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Trigger - Add to Muscle Attack Auto Cast Active <gen> the event (Unit - (Attacked unit) Takes damage)
  • Muscle Attack Auto Cast Active
    • Events
    • Conditions
      • MuscleAttackAutoCast[(Player number of (Owner of (Damage source)))] Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Mana of (Damage source)) Greater than or equal to 18.00
        • Then - Actions
          • Set MuscleAttackDamageReal[(Player number of (Owner of (Damage source)))] = ((0.40 + (0.10 x (Real((Level of General Muscle Attack for (Damage source)))))) x (Real((Strength of (Damage source) (Include bonuses)))))
          • Set MuscleAttackDamageInteger[(Player number of (Owner of (Damage source)))] = (Integer(MuscleAttackDamageReal[(Player number of (Owner of (Damage source)))]))
          • Trigger - Turn off (This trigger)
          • Unit - Cause (Damage source) to damage (Attacked unit), dealing ((0.40 + (0.10 x (Real((Level of General Muscle Attack for (Damage source)))))) x (Real((Strength of (Damage source) (Include bonuses))))) damage of attack type Hero and damage type Normal
          • Trigger - Turn on (This trigger)
          • Floating Text - Create floating text that reads (|c00ff0303 + ((String(MuscleAttackDamageInteger[(Player number of (Owner of (Damage source)))])) + |r)) above (Attacked unit) with Z offset 0.00, using font size 9.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 30.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.75 seconds
          • Floating Text - Hide (Last created floating text) for (All players matching ((Matching player) Not equal to (Owner of (Damage source))))
          • Floating Text - Show (Last created floating text) for (Player group((Owner of (Damage source))))
        • Else - Actions
          • Do nothing
it works! after my hero mana become less than 18, that damage bonus is not appear. but, the problem come after this, this trigger totally wont work even my hero mana is more than 18......can you help me? :confused:
 
Status
Not open for further replies.
Top