Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
WeaponSystem

Events


Unit - A unit Is attacked

Conditions

Actions


-------- Here is the USP .45 --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Attacking unit) has an item of type USP .45) Equal to True




(Charges remaining in (Item carried by (Attacking unit) of type |c0080FF00USP .45 Ammo|r)) Greater than 0



Then - Actions




Item - Set charges remaining in (Item carried by (Attacking unit) of type |c0080FF00USP .45 Ammo|r) to ((Charges remaining in (Item carried by (Attacking unit) of type |c0080FF00USP .45 Ammo|r)) - 1)



Else - Actions




Unit - Order (Attacking unit) to Stop




Item - Remove (Item carried by (Attacking unit) of type |c0080FF00USP .45 Ammo|r)


-------- Here is the Colt --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Attacking unit) has an item of type Colt M4A1) Equal to True




(Charges remaining in (Item carried by (Attacking unit) of type |c0080FF00Colt M4A1 Ammo|r)) Greater than 0



Then - Actions




Item - Set charges remaining in (Item carried by (Attacking unit) of type |c0080FF00Colt M4A1 Ammo|r) to ((Charges remaining in (Item carried by (Attacking unit) of type |c0080FF00USP .45 Ammo|r)) - 1)



Else - Actions




Unit - Order (Attacking unit) to Stop




Item - Remove (Item carried by (Attacking unit) of type |c0080FF00Colt M4A1 Ammo|r)


-------- And know you do on the same way with the other weapons and chance the weapon type and the ammo type --------
WeaponSystem2

Events


Unit - A unit Acquires an item

Conditions

Actions


-------- For the colt --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Item-type of (Item being manipulated)) Equal to Colt M4A1



Then - Actions




Hero - Create |c0080FF00Colt M4A1 Ammo|r and give it to (Hero manipulating item)



Else - Actions


-------- For the MP5 --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Item-type of (Item being manipulated)) Equal to MP5



Then - Actions




Hero - Create |c0080FF00MP5 Ammo|r and give it to (Hero manipulating item)



Else - Actions


-------- Simple go on with the rest --------
Example:Why you come up with the idea to put the attacking unit into a variable? =O
Unit - Order (Attacking unit) to Stop
Unit Group - Add (Attacking unit) to AOE
Unit - Add a 1.00 second Generic expiration timer to (Attacking unit)
call IssueImmediateOrderBJ( GetAttacker(), "stop" )
call GroupAddUnitSimple( GetAttacker(), udg_AOE )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetAttacker() )
