• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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