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

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:
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
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