• 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.

Ability choosing

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
So, I want to make a shop where heroes can buy abilities instead of making them have preset abilities, but I'm sure I need some kind of complicated trigger that I won't be able to figure out how to make, so here I am.

that link what was posted is good

basically a very simple buy ability thing work like this:

  • Melee Initialization
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to Scroll of Animate Dead
    • Actions
      • -------- we check if buy got this ability --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Animate Dead for (Buying unit)) Equal to 0
        • Then - Actions
          • -------- if his ability level is 0 then he dont have this ability --------
          • -------- so we remove the item and add ability to buying unit --------
          • Item - Remove (Sold Item)
          • Unit - Add Animate Dead to (Buying unit)
        • Else - Actions
          • -------- he have this ability --------
          • Game - Display to (All players) the text: You already have th...
 
Status
Not open for further replies.
Top