• 🏆 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] Multiple Spellbook levels

Status
Not open for further replies.
Level 3
Joined
Jul 25, 2014
Messages
31
Hello everybody. :)

I have a problem with spellbook triggers... I am a total noob with triggers btw.
I've made all spells I want my hero to have and a spellbook. But I don't know how to trigger that spellbook to add a new ability let's say on level 3, 5, and 7.
I have basic 4 hero spells and 3 of "unit" type of spells I want my hero to learn in Spellbook.

I've read around (and looked for every possible tutorial I could find) that I need to have multiple levels of Spellbook, but I don't know how to trigger it to update on levels 3, 5 and 7.

So basically:

Spellbook lvl 1 - 0 Spellbook Abilities (Hero Level 1)
Spellbook lvl 2 - Ability A (Hero Level 3)
Spellbook lvl 3 - Ability A, B ( Hero Level 5)
Spellbook lvl 4 - Ability A, B, C (Hero Level 7)

(I know how to make this, just not how to trigger)

Can anyone (in detail please) show me exactly how to do this, or make a demo map if you have time? Please and thank you
 
Level 12
Joined
May 20, 2009
Messages
822
  • Untitled Trigger 001
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of (Triggering unit)) Equal to 3
        • Then - Actions
          • Unit - Set level of Spell Book for (Triggering unit) to 2
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hero level of (Triggering unit)) Equal to 5
            • Then - Actions
              • Unit - Set level of Spell Book for (Triggering unit) to 3
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Hero level of (Triggering unit)) Equal to 7
                • Then - Actions
                  • Unit - Set level of Spell Book for (Triggering unit) to 4
                • Else - Actions
 
Level 3
Joined
Jul 25, 2014
Messages
31
  • Untitled Trigger 001
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of (Triggering unit)) Equal to 3
        • Then - Actions
          • Unit - Set level of Spell Book for (Triggering unit) to 2
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hero level of (Triggering unit)) Equal to 5
            • Then - Actions
              • Unit - Set level of Spell Book for (Triggering unit) to 3
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Hero level of (Triggering unit)) Equal to 7
                • Then - Actions
                  • Unit - Set level of Spell Book for (Triggering unit) to 4
                • Else - Actions


Thank you so much, it works perfectly. :)
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
  • Untitled Trigger 001
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • Set Int = (Hero level of (Triggering unit))
      • Unit - Set level of Spell Book for (Triggering unit) to ((Int + 1) / 2)
Int is Integer

However this will try to set the level of spellbook to 5 if you reach lvl 9 etc
 
Status
Not open for further replies.
Top