Basically what these triggers are for is remembering ammo and clips left (gold is bullets, lumber is clips). Each specific gun has it's own set of bullets and clips, I wanted to know if it is a good Idea using variables with arrays to store them, or should I use hastables? I have no idea how to work with them though.
This trigger below is the ammo memorizer or what ever you want to call it. Right now I only have 2 guns on the map and 2 gun types.
The triggers below is when the hero first picks up the AK-47 and when he picks it up again.
Thanks for reading.
This trigger below is the ammo memorizer or what ever you want to call it. Right now I only have 2 guns on the map and 2 gun types.
-
Ammo Storing
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero has an item of type AK-47) Equal to False
- (Hero has an item of type Pistol) Equal to False
-
Then - Actions
- Player - Set Player 1 (Red) Current gold to 0
- Player - Set Player 1 (Red) Current lumber to 0
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero has Pistol_One) Equal to True
-
Then - Actions
- Set Pistol_One_Ammo[1] = (Player 1 (Red) Current gold)
- Set Pistol_One_Ammo[2] = (Player 1 (Red) Current lumber)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero has AK47_One) Equal to True
-
Then - Actions
- Set AK47_One_Ammo[1] = (Player 1 (Red) Current gold)
- Set AK47_One_Ammo[2] = (Player 1 (Red) Current lumber)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
AK47 First Pick up
-
Events
- Unit - A unit Acquires an item
-
Conditions
- (Item being manipulated) Equal to AK47_One
-
Actions
- Player - Set Player 1 (Red) Current gold to 30
- Player - Set Player 1 (Red) Current lumber to 1
- Trigger - Turn off (This trigger)
- Trigger - Turn on AK47 Repick Up <gen>
-
Events
-
AK47 Repick Up
-
Events
- Unit - A unit Acquires an item
-
Conditions
- (Item being manipulated) Equal to AK47_One
-
Actions
- Player - Set Player 1 (Red) Current gold to AK47_One_Ammo[1]
- Player - Set Player 1 (Red) Current lumber to AK47_One_Ammo[2]
-
Events