• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Shop Abilties Problem

Status
Not open for further replies.
Level 10
Joined
Jul 22, 2008
Messages
363
In this game im making you can buy abilities from shops only Im having some problems. I don't have the trigger right in front of me but it goes something like.
Event: Unit sells an itme
Conditions- Item value equal to Grenade Launcher
Action- Hero give ..............How I give abilites?
 
Level 3
Joined
Aug 20, 2008
Messages
54
Okay, I used tomes, I have the same system.
But heres how mine looks:

  • LearnSpell
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to <Your Spells Item>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Hero manipulating item)) Equal to <Spell Learner>
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of <Spell> for (Hero manipulating item)) Greater than or equal to 1
              • (Level of <Spell> for (Hero manipulating item)) Less than <Max Level of Spell>
            • Then - Actions
              • Unit - Increase level of <Spell> for (Hero manipulating item)
            • Else - Actions
              • Unit - Add <Spell> to (Hero manipulating item)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of <Spell> for (Hero manipulating item)) Equal to <Max Level of Spell>
            • Then - Actions
              • Game - Display to (Player group((Owner of (Hero manipulating item)))) for 10.00 seconds the text: You have this spell maxed!
              • Player - Add 1 to (Owner of (Hero manipulating item)) Current lumber
            • Else - Actions
        • Else - Actions
          • Game - Display to (Player group((Owner of (Hero manipulating item)))) for 10.00 seconds the text: You cannot learn this spell!
          • Player - Add 1 to (Owner of (Hero manipulating item)) Current lumber
The Lumber is gained 1 per level, and spells take 1 lumber to buy.
The last Else Actions is just refunding the lumber, otherwise they would be mad if they got something they couldnt use, right? :p

Hope this helped, enjoy!
 
Status
Not open for further replies.
Top