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

Status
Not open for further replies.
  • Events
  • Unit - A unit Begins The Effect Of An Ability
  • Conditions
    • (Ability being cast) = (ability)
    • Level of (Ability) for (Unit) equal to 1
  • Actions
    • Item - Create (Item) at a random point in (Playable Map area)
    • Hero - Give (Last created item) to (Hero)
That should allow you to give an item to the hero when the ability is level 1.. if the ability is level 2 you need to make another trigger and also a trigger in between like this

  • Events
    • Time - Every .30 seconds of game time
  • Conditions
    • Level of (Ability) for (Unit) equal to 2
  • Actions
    • Trigger - Turn off (name of level 1 trigger)
    • Trigger - Turn on (name of level 2 trigger)
    • Trigger - Turn off (This Trigger)
And put that in between every time the spell levels up.. there may be an easier way but thats the best i can think of on the spot..
 
Level 9
Joined
Apr 3, 2008
Messages
700
  • Trigger
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to
    • Actions
      • For each (Integer A) from 1 to 100, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of (Ability being cast) for (Triggering unit)) Equal to (Integer A)
            • Then - Actions
              • Hero - Create Item[(Integer A)] and give it to (Triggering unit)
            • Else - Actions

1. item is a global array itemtype.
2. Set Item variable in map initialization.
3. "Ability being cast" is ability comparison.
4. Checking the level of ability is integer comparison. Unit - level of ability for unit.
 
Last edited:
Status
Not open for further replies.
Top