🏆 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!
Actually I don't understand what's the problem here?
I mean I understand ( and saw it in the map ) that you want 5 different weapons with 5 different ammo types right?
But know there are different ways to do that: In the test map, the Rifleman only need to pick up the ammo and can fire. Is that ok, or should the unit have the weapon in the inventory and the matching ammo to that weapon or what you exactly want?
This trigger can be the base system trigger. The unit must have BOTH the weapon and the correct ammo type.
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 --------
Now I don't know what you want: If both weapon and ammo are on the ground and can be picked or buy, or it the hero only should pick up the weapon and get the ammo you can use this:
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)
1) The map size of my map is bigger then yours, so I must add something
2) If I open the map ( my map ) I have more triggers then if I open yours.
1 + 2 = 3) You open the wrong map? You press "ok" if he wants overwrite the map ( because of the same name ), else you do some other thing wrong, because I have the added triggers.
@Maker: I wanted to ask this all the time, but I forget:
Why you come up with the idea to put the attacking unit into a variable? =O
Don't want to say that this is bad, but I want understand this way you though about^^
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.