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

Need Trigger help

Status
Not open for further replies.
Level 2
Joined
Aug 27, 2005
Messages
7
im making an AOS map in wich heros can buy items
that are sets like armor gloves boots helm weapon shield and since i want to make it more interesting i need a trigger that will allow player to only carry 1 or 2 weapons weapon and shield and can only equip 1 of the same items anyone can help?
 
Level 5
Joined
Jul 31, 2004
Messages
108
Fairly simple, once you know how to do it.

Code:
ASDF
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Triggering unit) belongs to an enemy of Player 12 (Brown)) Equal to True
    Actions
        If ((Item-type of (Item being manipulated)) Equal to Crown of Kings +5) then do (Set Helm[(Player number of (Owner of (Triggering unit)))] = (Helm[(Player number of (Owner of (Triggering unit)))] + 1)) else do (Do nothing)
        Set Item[(Player number of (Owner of (Triggering unit)))] = (Item being manipulated)
        Trigger - Run Check 2 <gen> (checking conditions)

Then...

Code:
Check 2
    Events
    Conditions
    Actions
        If (Helm[(Player number of (Owner of (Triggering unit)))] Greater than 1) then do (Hero - Drop Item[(Player number of (Owner of (Triggering unit)))] from Hero[(Player number of (Triggering player))]) else do (Do nothing)

If that doesn't work tell me. It should

-PalidinMaster3

(Helm, Shield, Weapon, etc could be more variables)
 
Status
Not open for further replies.
Top