• 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] Limited Spells

Status
Not open for further replies.

kj_

kj_

Level 5
Joined
Aug 1, 2008
Messages
134
I've got triggers if you type a specific thing you gain a spell ... but say if the unit has like already 5 spells he can't get anymore I know this can be done via integer var's but I'm not sure how , but if there is an EASIER way I would use it :)
Help Apprec
:wink:
~kj
+Rep to those who will help.:thumbs_up:
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
I'm not sure what your problem is but..
If I understand it correctly you:
- Player red types: -giveblizzard --> player red hero gains blizzard.
- You want to limit the triggers to work 5 times so he cant do it a sixth time.

If so then create a integer in the variables and name it RedSpells.
Then edit your triggers something like this:

  • Limit
    • Events
      • Player - Player 1 (Red) types a chat message containing -<your command> as An exact match
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • RedSpells Less than 5
    • Actions
      • Set RedSpells = (RedSpells + 1)
      • Unit - Add Blizzard to <RedHero>
RedHero = Unit variable to store the hero of player red upon creation.
You have to set the variable for that unit when that hero enters the map. :wink:
 
  • Like
Reactions: kj_
Status
Not open for further replies.
Top