• 🏆 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] More than 5 Hero Abilities

Status
Not open for further replies.
Level 6
Joined
Jun 14, 2008
Messages
191
Ok I can't for the life of me find an answer by searching so I'm posting.

Basically I'm working on a spore map that requires a hero to pick one of several passive abilities every level. First I tried creating 2 spell books, one that the hero always has and one that he gets when he levels and adding 8 war stomp abilities to it and once used, removes the spellbook and adds it to the other. Problem was, it activated all 8 no matter which one you picked. So I ended up using 8 different stomp abilities. This seemed to work, however, when a spell is clicked to be added, it sometimes adds it and won't close the "when gained" spellbook and sometimes it won't and does close it.

Usually this type of thing is a quick, one line fix, but I'm baffled.

Here's the whole thing if it helps...

  • p3 Bonuses
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • zPlayer_Phase[(Player number of (Owner of (Casting unit)))] Equal to 3
      • ((Owner of (Casting unit)) is in zCurrent_Players) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to 1 Grow Bigger Claws
          • (Ability being cast) Equal to 2 Sharpen Claws
          • (Ability being cast) Equal to 3 Mix Coolant
          • (Ability being cast) Equal to 4 Mutate Poison Glands
          • (Ability being cast) Equal to 5 Grow Harder Skin
          • (Ability being cast) Equal to 6 Grow Spikes
          • (Ability being cast) Equal to 7 Improve Reflexes
          • (Ability being cast) Equal to 8 Digest Blood
    • Actions
      • Game - Display to (All players) the text: (Name of (Ability being cast))
      • Set Unspent_Skill_Count[t_Integer] = (Unspent_Skill_Count[t_Integer] - 1)
      • Set t_Integer = (Player number of (Owner of (Casting unit)))
      • -------- Pick Ability --------
      • -------- ------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to 1 Grow Bigger Claws
        • Then - Actions
          • Set t_ability = Claw Size
          • Set p2Stored_Bash[t_Integer] = (p2Stored_Bash[t_Integer] + 1)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Equal to 2 Sharpen Claws
            • Then - Actions
              • Set t_ability = Claw Sharpness
              • Set p2Stored_Critical[t_Integer] = (p2Stored_Critical[t_Integer] + 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Ability being cast) Equal to 7 Improve Reflexes
                • Then - Actions
                  • Set t_ability = Reflexes
                  • Set p2Stored_Evasion[t_Integer] = (p2Stored_Evasion[t_Integer] + 1)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Ability being cast) Equal to 3 Mix Coolant
                    • Then - Actions
                      • Set t_ability = Coolant Mixture
                      • Set p2Stored_Freeze[t_Integer] = (p2Stored_Freeze[t_Integer] + 1)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Ability being cast) Equal to 5 Grow Harder Skin
                        • Then - Actions
                          • Set t_ability = Hardened Skin
                          • Set p2Stored_HardSkin[t_Integer] = (p2Stored_HardSkin[t_Integer] + 1)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Ability being cast) Equal to 6 Grow Spikes
                            • Then - Actions
                              • Set t_ability = Spikes
                              • Set p2Stored_Spikes[t_Integer] = (p2Stored_Spikes[t_Integer] + 1)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Ability being cast) Equal to 8 Digest Blood
                                • Then - Actions
                                  • Set t_ability = Vampirism
                                  • Set p2Stored_Vamp[t_Integer] = (p2Stored_Vamp[t_Integer] + 1)
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Ability being cast) Equal to 4 Mutate Poison Glands
                                    • Then - Actions
                                      • Set t_ability = Poison Glands
                                      • Set p2Stored_Poison[t_Integer] = (p2Stored_Poison[t_Integer] + 1)
                                    • Else - Actions
      • -------- Remove Upgrade Ability --------
      • -------- ------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Unspent_Skill_Count[t_Integer] Less than or equal to 0
        • Then - Actions
          • Unit - Remove Upgrade Ability from (Casting unit)
        • Else - Actions
      • -------- Increase ability --------
      • -------- ------------------------------- --------
      • Unit - Increase level of t_ability for (Casting unit)
      • Unit Group - Pick every unit in p3_Player_Nest_Group[t_Integer] and do (Actions)
        • Loop - Actions
          • Unit - Increase level of t_ability for (Picked unit)
      • -------- Other --------
      • -------- ------------------------------- --------
      • Unit - Order (Casting unit) to Stop
 
Status
Not open for further replies.
Top