• 🏆 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] Trouble with learning spells

Status
Not open for further replies.
Level 2
Joined
Aug 13, 2006
Messages
12
So, i'm trying to make some hero in my map learn their spells with a dialog, but it doesn't want to work...

Variables i used:
VampireBox: dialog
VampireBoxButton: dialog button; array (size: 8)
VampireBoxChose: Integer; array (size:8)
Nosferatu[11] : a hero
Nosferatu[12] : another hero
Nosferatu[1=>10]: nothing

This is the first trigger, creating the dialog
  • Create BoxVamp
    • Events
      • Time - Elapsed game time is 0.02 seconds
    • Conditions
    • Actions
      • Dialog - Change the title of VampireBox to Choose Your Healing...
      • Dialog - Create a dialog button for VampireBox labelled |cff0000ffHealing W...
      • Set VampireBoxButton[0] = (Last created dialog Button)
      • Dialog - Create a dialog button for VampireBox labelled |cffff0000Rejuvenat...
      • Set VampireBoxButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for VampireBox labelled |cff00ff00Instant H...
      • Set VampireBoxButton[2] = (Last created dialog Button)
      • For each (Integer A) from 11 to 12, do (Actions)
        • Loop - Actions
          • Dialog - Show VampireBox for (Player((Integer A)))
The second one, recording the button pressed
  • Vamp Click
    • Events
      • Dialog - A dialog button is clicked for VampireBox
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to VampireBoxButton[0]
        • Then - Actions
          • Set VampireBoxChose[(Player number of (Triggering player))] = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to VampireBoxButton[1]
        • Then - Actions
          • Set VampireBoxChose[(Player number of (Triggering player))] = 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to VampireBoxButton[2]
        • Then - Actions
          • Set VampireBoxChose[(Player number of (Triggering player))] = 3
        • Else - Actions
and the 3rd one, adding the spellbook (healspell), and leveling the ability in it (see atachement)
  • Create Heal Spell
    • Events
      • Time - Elapsed game time is 10.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 11 to 12, do (Actions)
        • Loop - Actions
          • Dialog - Hide VampireBox for (Player((Integer A)))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) controller) Equal to User
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Unit - Add HealSpell to Nosferatu[(Integer A)]
              • Unit - Change ownership of Nosferatu[(Integer A)] to (Player((Integer A))) and Change color
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • VampireBoxChose[(Integer A)] Equal to 1
                • Then - Actions
                  • Unit - Set level of Choose Your Heal Spell for Nosferatu[(Integer A)] to 1
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • VampireBoxChose[(Integer A)] Equal to 2
                    • Then - Actions
                      • Unit - Set level of Choose Your Heal Spell for Nosferatu[(Integer A)] to 2
                    • Else - Actions
                      • Unit - Set level of Choose Your Heal Spell for Nosferatu[(Integer A)] to 3
            • Else - Actions
              • Unit - Remove Nosferatu[(Integer A)] from the game
i always end up in getting a healing wave :(
can someone help me ? please
 

Attachments

  • spellinoe.jpg
    spellinoe.jpg
    131.1 KB · Views: 79
Status
Not open for further replies.
Top