• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Waits in a loop

Status
Not open for further replies.
Level 13
Joined
Oct 16, 2010
Messages
731
Hi,

So I've been working on a gun system for my new map and I wanted to have "burst" guns as a thing. Currently all this means is that if it's burst count is 2 it'll fire 2 shots at a time rather than 1, using ammo on both shots.

However this does just make every gun look like a shotgun. So my theory is what if I could use a wait within the loop that gives each shot a little bit of a delay, this would make it look like a burst.

I've been looking at a few tutorials about waits and I still wasn't sure so I thought I'd ask. I can't post the triggers right now but would this technically be a possibility?
 

Ardenian

A

Ardenian

Heavily depends on the circumstances.

There are some nice tricks regarding this issue:
http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/exact-cinematic-timing-trigger-queue-timers-41694/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/upwards-counting-timer-175541/
http://www.hiveworkshop.com/forums/tutorial-submission-283/types-timers-257339/
These tutorials allow you, with modification, to achieve what you are searching for.

However, you can also add a little wait and see whether it influences the gameplay.
 
Level 13
Joined
Oct 16, 2010
Messages
731
Hi again only just been able to get to wc. Attached the triggers below. If you need me to explain each variable I will, but for this all I'm trying to figure out is how to make bursts different to pellets. (Pellets being how many shots are fired per ammo, and bursts being how many bullets are fired at any one time).

  • Gun Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Gun_LoopInt) from 1 to Gun_MaxIndex, do (Actions)
        • Loop - Actions
          • -------- Move text to caster --------
          • Floating Text - Change the position of Gun_Text[Gun_LoopInt] to Gun_CasterUnit[Gun_LoopInt] with Z offset 0.00
          • -------- If alive do stuff --------
          • -------- If dead remove gun dummy and change text to DEAD --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Gun_CasterUnit[Gun_LoopInt] is alive) Equal to True
            • Then - Actions
              • -------- If no gun in slot 1 set as no active gun --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Item carried by Gun_CasterUnit[Gun_LoopInt] in slot 1) Equal to No item
                      • (Item carried by Gun_CasterUnit[Gun_LoopInt] in slot 1) Not equal to Gun_ActiveGun[Gun_LoopInt]
                • Then - Actions
                  • Set Gun_ActiveGun[Gun_LoopInt] = No item
                  • Unit - Remove Gun_DummyUnit[Gun_LoopInt] from the game
                  • Set Gun_DummyUnit[Gun_LoopInt] = No unit
                • Else - Actions
              • -------- If no active gun pick slot 1 gun - UPDATE STATS --------
              • -------- Otherwise text = Unarmed --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Gun_ActiveGun[Gun_LoopInt] Equal to No item
                  • (Item carried by Gun_CasterUnit[Gun_LoopInt] in slot 1) Not equal to No item
                • Then - Actions
                  • Set Gun_ActiveGun[Gun_LoopInt] = (Item carried by Gun_CasterUnit[Gun_LoopInt] in slot 1)
                  • Unit - Remove Gun_DummyUnit[Gun_LoopInt] from the game
                  • Set Gun_DummyUnit[Gun_LoopInt] = No unit
                  • Trigger - Run Gun Update Stats Assault <gen> (checking conditions)
                  • Trigger - Run Gun Update Stats LMG <gen> (checking conditions)
                  • Trigger - Run Gun Update Stats Launcher <gen> (checking conditions)
                  • Trigger - Run Gun Update Stats Pistol <gen> (checking conditions)
                  • Trigger - Run Gun Update Stats SMG <gen> (checking conditions)
                  • Trigger - Run Gun Update Stats Shotgun <gen> (checking conditions)
                  • Trigger - Run Gun Update Stats Sniper <gen> (checking conditions)
                • Else - Actions
                  • Floating Text - Change text of Gun_Text[Gun_LoopInt] to Unarmed using font size 10.00
              • -------- If active gun fire/reload --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Gun_ActiveGun[Gun_LoopInt] Not equal to No item
                • Then - Actions
                  • Set TempPoint = (Position of Gun_CasterUnit[Gun_LoopInt])
                  • Unit - Move Gun_DummyUnit[Gun_LoopInt] instantly to TempPoint
                  • Custom script: call RemoveLocation(udg_TempPoint)
                  • -------- If empty clip reload --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Charges remaining in Gun_ActiveGun[Gun_LoopInt]) Equal to 0
                      • Gun_ReloadingBlooean[Gun_LoopInt] Equal to False
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Gun_AmmoType[Gun_LoopInt] Equal to Assault Rifle
                        • Then - Actions
                          • Set TempInt = Ammo_AssaultRifle[Gun_LoopInt]
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Gun_AmmoType[Gun_LoopInt] Equal to LMG
                            • Then - Actions
                              • Set TempInt = Ammo_LMG[Gun_LoopInt]
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • Gun_AmmoType[Gun_LoopInt] Equal to Pistol
                                • Then - Actions
                                  • Set TempInt = Ammo_Pistol[Gun_LoopInt]
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • Gun_AmmoType[Gun_LoopInt] Equal to Rocket Launcher
                                    • Then - Actions
                                      • Set TempInt = Ammo_RocketLauncher[Gun_LoopInt]
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • Gun_AmmoType[Gun_LoopInt] Equal to SMG
                                        • Then - Actions
                                          • Set TempInt = Ammo_SMG[Gun_LoopInt]
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • Gun_AmmoType[Gun_LoopInt] Equal to Shotgun
                                            • Then - Actions
                                              • Set TempInt = Ammo_Shotgun[Gun_LoopInt]
                                            • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • TempInt Greater than or equal to 1
                        • Then - Actions
                          • Set Gun_ReloadingBlooean[Gun_LoopInt] = True
                          • Set TempReal = Gun_ReloadSpeedMax[Gun_LoopInt]
                          • Trigger - Run Gun Reload Mods <gen> (checking conditions)
                          • Set Gun_ReloadSpeedCurrent[Gun_LoopInt] = TempReal
                        • Else - Actions
                    • Else - Actions
                  • -------- If reloading do this --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Gun_ReloadingBlooean[Gun_LoopInt] Equal to True
                    • Then - Actions
                      • -------- Lower the number --------
                      • Set Gun_ReloadSpeedCurrent[Gun_LoopInt] = (Gun_ReloadSpeedCurrent[Gun_LoopInt] - 0.03)
                      • -------- If lower than or equal 0 finish reloading --------
                      • -------- Otherwise text --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Gun_ReloadSpeedCurrent[Gun_LoopInt] Less than or equal to 0.00
                        • Then - Actions
                          • Set Gun_ReloadingBlooean[Gun_LoopInt] = False
                          • Set TempInt = Gun_ClipMax[Gun_LoopInt]
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Gun_AmmoType[Gun_LoopInt] Equal to Assault Rifle
                            • Then - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • Ammo_AssaultRifle[Gun_LoopInt] Greater than or equal to TempInt
                                • Then - Actions
                                  • Set Ammo_AssaultRifle[Gun_LoopInt] = (Ammo_AssaultRifle[Gun_LoopInt] - TempInt)
                                  • Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to TempInt
                                • Else - Actions
                                  • Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to Ammo_AssaultRifle[Gun_LoopInt]
                                  • Set Ammo_AssaultRifle[Gun_LoopInt] = 0
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • Gun_AmmoType[Gun_LoopInt] Equal to LMG
                                • Then - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • Ammo_LMG[Gun_LoopInt] Greater than or equal to TempInt
                                    • Then - Actions
                                      • Set Ammo_LMG[Gun_LoopInt] = (Ammo_LMG[Gun_LoopInt] - TempInt)
                                      • Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to TempInt
                                    • Else - Actions
                                      • Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to Ammo_LMG[Gun_LoopInt]
                                      • Set Ammo_LMG[Gun_LoopInt] = 0
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • Gun_AmmoType[Gun_LoopInt] Equal to Pistol
                                    • Then - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • Ammo_Pistol[Gun_LoopInt] Greater than or equal to TempInt
                                        • Then - Actions
                                          • Set Ammo_Pistol[Gun_LoopInt] = (Ammo_Pistol[Gun_LoopInt] - TempInt)
                                          • Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to TempInt
                                        • Else - Actions
                                          • Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to Ammo_Pistol[Gun_LoopInt]
                                          • Set Ammo_Pistol[Gun_LoopInt] = 0
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • Gun_AmmoType[Gun_LoopInt] Equal to Rocket Launcher
                                        • Then - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • Ammo_RocketLauncher[Gun_LoopInt] Greater than or equal to TempInt
                                            • Then - Actions
                                              • Set Ammo_RocketLauncher[Gun_LoopInt] = (Ammo_RocketLauncher[Gun_LoopInt] - TempInt)
                                              • Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to TempInt
                                            • Else - Actions
                                              • Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to Ammo_RocketLauncher[Gun_LoopInt]
                                              • Set Ammo_RocketLauncher[Gun_LoopInt] = 0
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • Gun_AmmoType[Gun_LoopInt] Equal to SMG
                                            • Then - Actions
                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                • If - Conditions
                                                  • Ammo_SMG[Gun_LoopInt] Greater than or equal to TempInt
                                                • Then - Actions
                                                  • Set Ammo_SMG[Gun_LoopInt] = (Ammo_SMG[Gun_LoopInt] - TempInt)
                                                  • Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to TempInt
                                                • Else - Actions
                                                  • Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to Ammo_SMG[Gun_LoopInt]
                                                  • Set Ammo_SMG[Gun_LoopInt] = 0
                                            • Else - Actions
                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                • If - Conditions
                                                  • Gun_AmmoType[Gun_LoopInt] Equal to Shotgun
                                                • Then - Actions
                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    • If - Conditions
                                                      • Ammo_Shotgun[Gun_LoopInt] Greater than or equal to TempInt
                                                    • Then - Actions
                                                      • Set Ammo_Shotgun[Gun_LoopInt] = (Ammo_Shotgun[Gun_LoopInt] - TempInt)
                                                      • Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to TempInt
                                                    • Else - Actions
                                                      • Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to Ammo_Shotgun[Gun_LoopInt]
                                                      • Set Ammo_Shotgun[Gun_LoopInt] = 0
                                                • Else - Actions
                        • Else - Actions
                          • Floating Text - Change text of Gun_Text[Gun_LoopInt] to ((Name of Gun_ActiveGun[Gun_LoopInt]) + (|n + (Reloading + (|n + (String(Gun_ReloadSpeedCurrent[Gun_LoopInt], 2, 2)))))) using font size 10.00
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Gun_AmmoType[Gun_LoopInt] Equal to Assault Rifle
                        • Then - Actions
                          • Set TempString = (((String(Ammo_AssaultRifle[Gun_LoopInt])) + /) + (String(MaxAmmo_AssaultRifle[Gun_LoopInt])))
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Gun_AmmoType[Gun_LoopInt] Equal to LMG
                            • Then - Actions
                              • Set TempString = (((String(Ammo_LMG[Gun_LoopInt])) + /) + (String(MaxAmmo_LMG[Gun_LoopInt])))
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • Gun_AmmoType[Gun_LoopInt] Equal to Pistol
                                • Then - Actions
                                  • Set TempString = (((String(Ammo_Pistol[Gun_LoopInt])) + /) + (String(MaxAmmo_Pistol[Gun_LoopInt])))
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • Gun_AmmoType[Gun_LoopInt] Equal to Rocket Launcher
                                    • Then - Actions
                                      • Set TempString = (((String(Ammo_RocketLauncher[Gun_LoopInt])) + /) + (String(MaxAmmo_RocketLauncher[Gun_LoopInt])))
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • Gun_AmmoType[Gun_LoopInt] Equal to SMG
                                        • Then - Actions
                                          • Set TempString = (((String(Ammo_SMG[Gun_LoopInt])) + /) + (String(MaxAmmo_SMG[Gun_LoopInt])))
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • Gun_AmmoType[Gun_LoopInt] Equal to Shotgun
                                            • Then - Actions
                                              • Set TempString = (((String(Ammo_Shotgun[Gun_LoopInt])) + /) + (String(MaxAmmo_Shotgun[Gun_LoopInt])))
                                            • Else - Actions
                      • Floating Text - Change text of Gun_Text[Gun_LoopInt] to ((Name of Gun_ActiveGun[Gun_LoopInt]) + (|n + (((String((Charges remaining in Gun_ActiveGun[Gun_LoopInt]))) + (/ + (String(Gun_ClipMax[Gun_LoopInt])))) + (|n + TempString)))) using font size 10.00
                      • -------- If not reloading lower fire rate --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Gun_FireRateCurrent[Gun_LoopInt] Greater than 0.00
                        • Then - Actions
                          • Set TempReal = 0.03
                          • -------- Run Fire Rate mods --------
                          • Trigger - Run Gun Fire Rate Mods <gen> (checking conditions)
                          • Set Gun_FireRateCurrent[Gun_LoopInt] = (Gun_FireRateCurrent[Gun_LoopInt] - TempReal)
                        • Else - Actions
                  • -------- If target is no visible/dead/out of range set no target --------
                  • Set TempPoint = (Position of Gun_CasterUnit[Gun_LoopInt])
                  • Set TempPoint2 = (Position of Gun_TargetUnit[Gun_LoopInt])
                  • Set TempReal = (Distance between TempPoint and TempPoint2)
                  • Custom script: call RemoveLocation(udg_TempPoint)
                  • Custom script: call RemoveLocation(udg_TempPoint2)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Gun_TargetUnit[Gun_LoopInt] is visible to (Owner of Gun_CasterUnit[Gun_LoopInt])) Equal to False
                          • (Gun_TargetUnit[Gun_LoopInt] is dead) Equal to True
                          • TempReal Greater than Gun_Range[Gun_LoopInt]
                    • Then - Actions
                      • Set Gun_TargetUnit[Gun_LoopInt] = No unit
                    • Else - Actions
                  • -------- If no target pick target as long as on autotarget --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Gun_TargetUnit[Gun_LoopInt] Equal to No unit
                      • (Gun_CasterUnit[Gun_LoopInt] has buff Auto-Targetting ) Equal to True
                    • Then - Actions
                      • Set TempPoint = (Position of Gun_CasterUnit[Gun_LoopInt])
                      • Set TempUnitGroup = (Units within Gun_Range[Gun_LoopInt] of TempPoint matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is visible to (Owner of Gun_CasterUnit[Gun_LoopInt])) Equal to True)) and (((Matching unit) belongs to an enemy of (Owner of Gun_Cast
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Number of units in TempUnitGroup) Greater than or equal to 1
                        • Then - Actions
                          • Set Gun_TargetUnit[Gun_LoopInt] = (Random unit from TempUnitGroup)
                        • Else - Actions
                      • Custom script: call RemoveLocation(udg_TempPoint)
                      • Custom script: call DestroyGroup(udg_TempUnitGroup)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Gun_TargetUnit[Gun_LoopInt] Not equal to No unit
                    • Then - Actions
                      • Unit - Make Gun_DummyUnit[Gun_LoopInt] face Gun_TargetUnit[Gun_LoopInt] over 0.00 seconds
                    • Else - Actions
                      • Unit - Make Gun_DummyUnit[Gun_LoopInt] face (Facing of Gun_CasterUnit[Gun_LoopInt]) over 0.00 seconds
                  • -------- If not reloading + not waiting on fire rate + got a target --------
                  • -------- SHOOT --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Gun_ReloadingBlooean[Gun_LoopInt] Equal to False
                      • Gun_FireRateCurrent[Gun_LoopInt] Less than or equal to 0.00
                      • Gun_TargetUnit[Gun_LoopInt] Not equal to No unit
                    • Then - Actions
                      • Trigger - Run Gun Shoot <gen> (checking conditions)
                    • Else - Actions
                • Else - Actions
            • Else - Actions
              • Unit - Remove Gun_DummyUnit[Gun_LoopInt] from the game
              • Set Gun_DummyUnit[Gun_LoopInt] = No unit
              • Set Gun_ActiveGun[Gun_LoopInt] = No item
              • Floating Text - Change text of Gun_Text[Gun_LoopInt] to Dead using font size 10.00
Gun Shoot
Events
Conditions
Actions
Set TempPoint = (Position of Gun_CasterUnit[Gun_LoopInt])
Set TempPoint2 = (Position of Gun_TargetUnit[Gun_LoopInt])
Set TempReal = (Angle from TempPoint to TempPoint2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempReal Less than 0.00
Then - Actions
Set TempReal = (TempReal + 360.00)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Facing of Gun_DummyUnit[Gun_LoopInt]) Greater than or equal to (TempReal - 5.00)
(Facing of Gun_DummyUnit[Gun_LoopInt]) Less than or equal to (TempReal + 5.00)
Then - Actions
-------- Shoot projectiles --------
-------- Full burst --------
For each (Integer Gun_BurstLoop) from 1 to Gun_BurstCount[Gun_LoopInt], do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Charges remaining in Gun_ActiveGun[Gun_LoopInt]) Greater than or equal to 1
Then - Actions
For each (Integer Gun_PelletLoop) from 1 to Gun_PelletCount[Gun_LoopInt], do (Actions)
Loop - Actions
Set Bullet_MaxIndex = (Bullet_MaxIndex + 1)
Set Bullet_AoE[Bullet_MaxIndex] = Gun_AoE[Gun_LoopInt]
Set Bullet_CasterUnit[Bullet_MaxIndex] = Gun_CasterUnit[Gun_LoopInt]
Set Bullet_CritChance[Bullet_MaxIndex] = Gun_CritChance[Gun_LoopInt]
Set TempReal = Gun_Damage[Gun_LoopInt]
Trigger - Run Gun Damage Mods <gen> (checking conditions)
Set Bullet_Damage[Bullet_MaxIndex] = TempReal
Set Bullet_Distance[Bullet_MaxIndex] = Gun_Range[Gun_LoopInt]
Set TempReal = Gun_Accuracy[Gun_LoopInt]
Trigger - Run Gun Accuracy Mods <gen> (checking conditions)
Set TempReal = ((100.00 - TempReal) / 2.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempReal Less than 0.00
Then - Actions
Set TempReal = 0.00
Else - Actions
Unit - Create 1 Bullet Dummy (Small Dart) for (Owner of Gun_CasterUnit[Gun_LoopInt]) at TempPoint facing ((Facing of Gun_DummyUnit[Gun_LoopInt]) + (Random real number between (TempReal x -1.00) and TempReal)) degrees
Set Bullet_DummyUnit[Bullet_MaxIndex] = (Last created unit)
Set Bullet_GunSource[Bullet_MaxIndex] = (Item-type of Gun_ActiveGun[Gun_LoopInt])
-------- BULLET GROUP --------
Unit Group - Pick every unit in Bullet_Group[Bullet_MaxIndex] and do (Actions)
Loop - Actions
Unit Group - Remove (Picked unit) from Bullet_Group[Bullet_MaxIndex]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Bullet_MaxIndex Equal to 1
Then - Actions
Trigger - Turn on Bullet Loop <gen>
Else - Actions
Else - Actions
Item - Set charges remaining in Gun_ActiveGun[Gun_LoopInt] to ((Charges remaining in Gun_ActiveGun[Gun_LoopInt]) - 1)
-------- If no ammo reload --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Charges remaining in Gun_ActiveGun[Gun_LoopInt]) Greater than 0
Then - Actions
Set Gun_FireRateCurrent[Gun_LoopInt] = Gun_FireRateMax[Gun_LoopInt]
Else - Actions
Else - Actions
Custom script: call RemoveLocation(udg_TempPoint)
Custom script: call RemoveLocation(udg_TempPoint2)
 
Status
Not open for further replies.
Top