• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Spellbook Integers

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
I got a unit that has 4 spellbooks. Each spellbook has upgradeable spells. I have created an integer variable for each spell to check. The problem is, i dont know how to increase the integer based on the number of times that particular spell is cast. I tried with starts the effect of an ability, as well as starts casting an ability. They both did not work. Help me please. :sad:
 
Level 9
Joined
Jun 7, 2008
Messages
440
Ya it works. I had my integer messed up is all. :p
Ive run into another problem though:
  • Events
    • Unit - a unit begins the effect of an ability
  • Conditions
    • ((Ability being cast) Equal to Warstomp)
  • Actions
    • Set Spellbook_WarStomp = (Spellbook_WarStomp + 1)
    • Game - Display to (Player group((Triggering player))) the message: (String(Spellbook_WarStomp))
This all works fine and dandy. I run into a problem when i cast the ability. It gives a "+3" to the integer, instead of "+1". Any suggestions?
 
Level 9
Joined
Jun 7, 2008
Messages
440
Yes. It does. There is no other trigger that is used alongside with this integer.
The spell is cast and then it shows (like its supposed to except x3):

1

2

3
 
Status
Not open for further replies.
Top