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

Ammo/Gun in 1st slot trigger help

Status
Not open for further replies.
Level 5
Joined
Dec 11, 2010
Messages
101
I was making a map about zombies, and i stummbled onto a problem. Im trying to make an ammo systom where the first gun in your inventory has ammo (wood, preferably) and when a zombie gets within range of a certan gun, it will auto-maticaly shoot and incoming units, but i dont know how to do triggering much.

What im trying to say is i need a trigger systom like the one in Left 4 Dead (on this site) but the map is locked and i couldnt get help with it.

If you help ill give credits in my map(s) and +rep.

Thanks.

:vw_wtf:
 
it's something like this...

take note that the far seer, wand f lightning shield and a-like are only
SAMPLES, but basically this is how the idea looks like...
the unit cannot attack if there's no ammo in slot 1...
  • Fire
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Far Seer
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Charges remaining in (Item carried by (Attacking unit) in slot 1)) Greater than 0
          • (Item-type of (Item carried by (Attacking unit) in slot 1)) Equal to Wand of Lightning Shield
        • Then - Actions
          • Item - Set charges remaining in (Item carried by (Attacking unit) in slot 1) to ((Charges remaining in (Item carried by (Attacking unit) in slot 1)) - 1)
        • Else - Actions
          • Unit - Order (Attacking unit) to Stop
 
Status
Not open for further replies.
Top