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

[Spell] How to autocast ability via trigger

Status
Not open for further replies.
Level 3
Joined
Jan 1, 2013
Messages
43
Hello, i need help...

i have ability like morphling(dota), manipulating stats(point of agility and strength)

I use base ability replenish and essence of blight,

i have problem when the spell is activated(autocast), there is no change the point of agility/strength, but if i click the spell, stats is change...

i want the stats going change when i autocast it...

anyone can hep me?????

this is my spell trigger
Agility Gain

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to AGI
  • Actions
    • Set STR_PLUS = (Strength of (Triggering unit) (Exclude bonuses))
    • Set AGI_PLUS = (Agility of (Triggering unit) (Exclude bonuses))
    • Set AGI_STR_Add[0] = (2 x (Level of AGI for (Triggering unit)))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (AGI_PLUS - AGI_STR_Add[0]) Greater than 0
        • (STR_PLUS - AGI_STR_Add[0]) Greater than 0
      • Then - Actions
        • Hero - Modify Agility of (Triggering unit): Add AGI_STR_Add[0]
        • Hero - Modify Strength of (Triggering unit): Subtract AGI_STR_Add[0]
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (AGI_PLUS - AGI_STR_Add[0]) Less than or equal to 0
            • (STR_PLUS - AGI_STR_Add[0]) Greater than 0
          • Then - Actions
            • Hero - Modify Agility of (Triggering unit): Add AGI_STR_Add[0]
            • Hero - Modify Strength of (Triggering unit): Subtract AGI_STR_Add[0]
          • Else - Actions

Strength Gain

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to STR
  • Actions
    • Set STR_PLUS = (Strength of (Triggering unit) (Exclude bonuses))
    • Set AGI_PLUS = (Agility of (Triggering unit) (Exclude bonuses))
    • Set AGI_STR_Add[0] = (2 x (Level of AGI for (Triggering unit)))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (STR_PLUS - AGI_STR_Add[0]) Greater than 0
        • (AGI_PLUS - AGI_STR_Add[0]) Greater than 0
      • Then - Actions
        • Hero - Modify Agility of (Triggering unit): Subtract AGI_STR_Add[0]
        • Hero - Modify Strength of (Triggering unit): Add AGI_STR_Add[0]
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (STR_PLUS - AGI_STR_Add[0]) Less than or equal to 0
            • (AGI_PLUS - AGI_STR_Add[0]) Greater than 0
          • Then - Actions
            • Hero - Modify Strength of (Triggering unit): Add AGI_STR_Add[0]
            • Hero - Modify Agility of (Triggering unit): Subtract AGI_STR_Add[0]
          • Else - Actions


Learning the Spell

  • Events
    • Unit - A unit Learns a skill
  • Conditions
    • (Learned Hero Skill) Equal to AGI
  • Actions
    • Unit - Add STR to (Triggering unit)
    • Unit - Set level of STR for (Triggering unit) to (Level of AGI for (Triggering unit))


i'm sorry, my english is bad, but i know you're understand what i mean...

thank's
 
Last edited:
Level 19
Joined
Aug 8, 2007
Messages
2,765
dont u already have a thread

you cant use starts effect of ability for autocast you have to use an order
 
Level 3
Joined
Jan 1, 2013
Messages
43
dont u already have a thread

you cant use starts effect of ability for autocast you have to use an order

:vw_sad:

that's not what I mean...

I mean, there are the spell based on replenish and essence of blight, these is autocast ability...

If i cast manualy(click the ability), the point of agility and strength are change..

But if i autocast the ability, it no affect(point of agility/strength not be changed)

My problem is there, I want when i autocast the ability, the point of agility/strength can be changed...
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
:vw_sad:

that's not what I mean...

I mean, there are the spell based on replenish and essence of blight, these is autocast ability...

If i cast manualy(click the ability), the point of agility and strength are change..

But if i autocast the ability, it no affect(point of agility/strength not be changed)

My problem is there, I want when i autocast the ability, the point of agility/strength can be changed...

yeah... and? what am i missing?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
The auto-cast should be only dummy ability.
Once you catch the order of the Auto-cast ability, put that unit in a Unit Group and start the process.
If the order of the unit has turn to deactivate Auto-cast, remove the unit from Unit Group.

Assuming you're using base ability from Immolation;
  • Auto Cast
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(immolation))
        • Then - Actions
          • Unit Group - Add (Triggering unit) to UnitGroup
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(unimmolation))
            • Then - Actions
              • Unit Group - Remove (Triggering unit) from UnitGroup
            • Else - Actions
  • Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Hero - Modify Strength of (Picked unit): Add 10
          • Hero - Modify Agility of (Picked unit): Subtract 10
For the Agility Gain, use another base ability such as Essence of Blight or whatever, and make sure to catch its order first in order to use in the IF condition.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You should check for the orders "replenish" (Replenish) and "replenishlife" (Essence of Blight).

Replenish

Essence of Blight

  • Replenish
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (String((Issued order))) Equal to replenish
    • Actions
      • Hero - Modify Intelligence of (Triggering unit): Add 1
  • Replenish
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (String((Issued order))) Equal to replenishlife
    • Actions
      • Hero - Modify Strength of (Triggering unit): Add 1
These are just example triggers, but they do work when autocast (and also when clicked on obviously).

How many levels do these "STR" and "AGI"-abilities have by the way?
I'm heavily against abilities with many levels and would recommend BonusMod if it's too high.
 
Status
Not open for further replies.
Top