• 🏆 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!

Help For Perfect Buy Able Spell System

Status
Not open for further replies.
Level 5
Joined
Jan 5, 2019
Messages
108
Hey i am trying to make my spell "Buy Able" system another way, after someone bought a spell it has to go into the Hero Ability menu and be not learned before the player chose one. right now i am compete lost how to set it up but this is how my current one looks

  • Critical Strike
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Critical Strike
    • Actions
      • Set VariableSet Units = (Triggering unit)
      • Set VariableSet Ability[(Player number of (Owner of Units))] = Critical Strike
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (((Owner of (Triggering unit)) Food used) Less than or equal to 4) and ((Level of Critical Strike for (Triggering unit)) Equal to 0)
        • Then - Actions
          • Player - Add 1 to (Owner of (Triggering unit)).Food used
          • Unit - Add Ability[(Player number of (Owner of Units))] to Units
          • Special Effect - Create a special effect attached to the origin of Units using Abilities\Spells\Items\AIem\AIemTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: |c0000FFFF Critical...
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Ability[(Player number of (Owner of (Triggering unit)))] for (Triggering unit)) Equal to 0
            • Then - Actions
              • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: |c00FF0000 Critical...
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Ability[(Player number of (Owner of (Triggering unit)))] for (Triggering unit)) Not equal to 0
              • (((Owner of (Triggering unit)) Food used) Less than or equal to 5) and ((Level of Critical Strike for (Triggering unit)) Greater than or equal to 0)
              • (Level of Ability[(Player number of (Owner of Units))] for Units) Less than 10
            • Then - Actions
              • Unit - Increase level of Ability[(Player number of (Owner of Units))] for Units
              • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: (|c0000FFFF Critical Strike's |r Level + ( is + ( + (String((Level of Critical Strike for Units))))))
              • Special Effect - Create a special effect attached to the origin of Units using Abilities\Spells\Items\AIem\AIemTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Ability[(Player number of (Owner of Units))] for Units) Equal to 10
                • Then - Actions
                  • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: This spell is alrea...
                  • Player - Add 400 to (Owner of Units).Current gold
                • Else - Actions

This trigger is for not make people able to buy more then one of them

  • Cant Learn Critical Strike
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Critical Strike
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (((Owner of (Triggering unit)) Food used) Greater than 5) and ((Level of Critical Strike for (Triggering unit)) Equal to 0)
        • Then - Actions
          • Unit - For (Triggering unit), Ability Critical Strike , Disable ability: True, Hide UI: True
          • Player - Add 400 to (Owner of Units).Current gold
        • Else - Actions
 
The system in place in my map works like this:

Each hero gets 3 dummy abilities based off of channel
You can research abilities in a building
When the research is finished, a trigger adds a spell based off of "Engineering Upgrade", which replaces one of the dummy spells with the researched ability

The only problem with this system right now is that engineering upgrade is currently bugged, thanks to reforged, so ability icons and tooltips won't show up right, but that bug has been reported, so hopefully it'll get fixed at some point soon
 
Status
Not open for further replies.
Top