• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Ammo and guns

Status
Not open for further replies.
Level 8
Joined
Jun 26, 2010
Messages
530
Holy crap @ Darkzealot, why is yoru trigger that big? D;

Just an example on how integer loops can shrink your triggers. Here's your first one size-tweaked

  • specify ammo value
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
    • For Each Integer A from 1 to 12 do multiple actions
      • If ((Item-type of (Item being manipulated)) Equal to Pistol) then do (Set ammo[integer a] = 60) else do (Do nothing)
      • If ((Item-type of (Item being manipulated)) Equal to Rifle) then do (Set ammo[integer a] = 80) else do (Do nothing)
Also, i think using chargeable itens where the charges are your ammo is MUCH BETTER
 
Status
Not open for further replies.
Top