[These are the triggers that set the boolean variable "Shooting" to true/false by clicking LMB.]
Start Shooting
Events
UI - Player 1 clicks Left mouse button Down.
Local Variables
Conditions
And
Conditions
(PlayerUnit is alive) == True
Actions
Variable - Set Shooting = True
Stop Shooting
Events
UI - Player 1 clicks Left mouse button Up.
Local Variables
Conditions
And
Conditions
(PlayerUnit is alive) == True
Actions
Variable - Set Shooting = False
So these ones I made myself, they were not in there before. Next is the original trigger, which I tweaked a little. I removed the cooldown triggers (don't see how that could mess up anything) and I added a generic timer instead of just having a Mouse click event. Also I made it check if the Shooting variable is true.
Shoot
Events
Timer - Every 0.01 seconds of Game Time
Local Variables
Player = (Triggering player) <Integer>
Conditions
And
Conditions
(PlayerUnit is alive) == True
Shooting == True
CurAmmo > 0
W == False
A == False
S == False
D == False
Actions
- Fire a projectile if you have ammunition available
Variable - Modify CurAmmo: - 1
UI - Set boss bar 2 current value to CurAmmo (Do refresh the boss bar)
- Reload
General - If (Conditions) then do (Actions) else do (Actions)
If
CurAmmo == 0
Then
Variable - Set Reloading = True
Trigger - Run Reload (Ignore Conditions, Don't Wait until it finishes)
Else
- Shoot projectile
Animation - Play Attack animation for (Actor for PlayerUnit) as Default, using No Options options and Default Time blend time
Traceline(Player)
- Check if a unit was hit
General - If (Conditions) then do (Actions) else do (Actions)
If
TargetUnit != No Unit
Then
Environment - Execute Marine - Guass Rifle (Damage) on TargetUnit from PlayerUnit
Unit - Order TargetUnit to ( Attack targeting PlayerUnit) (Replace Existing Orders)
Else
- If above is false, shoot terrain
General - If (Conditions) then do (Actions) else do (Actions)
If
TargetPoint != No Point
Then
Environment - Execute Marine - Guass Rifle (Damage) at TargetPoint from PlayerUnit
Else
Sound - Play Immortal_AttackLaunch for (All players) (at 50.0% volume, skip the first 0.0 seconds)
And that's about it, there might be more things you need for me to post but the other things are only the traceline and reload things and stuff, which I haven't touched.
Thanks again in advance for any help
Edit: Ew dunno why the trigger text came out that ugly :(
0
Thanks for the reply.
[These are the triggers that set the boolean variable "Shooting" to true/false by clicking LMB.] Start Shooting Events UI - Player 1 clicks Left mouse button Down. Local Variables Conditions And Conditions (PlayerUnit is alive) == True Actions Variable - Set Shooting = True
Stop Shooting Events UI - Player 1 clicks Left mouse button Up. Local Variables Conditions And Conditions (PlayerUnit is alive) == True Actions Variable - Set Shooting = False
So these ones I made myself, they were not in there before. Next is the original trigger, which I tweaked a little. I removed the cooldown triggers (don't see how that could mess up anything) and I added a generic timer instead of just having a Mouse click event. Also I made it check if the Shooting variable is true.
Shoot Events Timer - Every 0.01 seconds of Game Time Local Variables Player = (Triggering player) <Integer> Conditions And Conditions (PlayerUnit is alive) == True Shooting == True CurAmmo > 0 W == False A == False S == False D == False Actions
-Fire a projectile if you have ammunition available Variable - Modify CurAmmo: - 1 UI - Set boss bar 2 current value to CurAmmo (Do refresh the boss bar)-Reload General - If (Conditions) then do (Actions) else do (Actions) If CurAmmo == 0 Then Variable - Set Reloading = True Trigger - Run Reload (Ignore Conditions, Don't Wait until it finishes) Else-Shoot projectile Animation - Play Attack animation for (Actor for PlayerUnit) as Default, using No Options options and Default Time blend time Traceline(Player)-Check if a unit was hit General - If (Conditions) then do (Actions) else do (Actions) If TargetUnit != No Unit Then Environment - Execute Marine - Guass Rifle (Damage) on TargetUnit from PlayerUnit Unit - Order TargetUnit to ( Attack targeting PlayerUnit) (Replace Existing Orders) Else-If above is false, shoot terrain General - If (Conditions) then do (Actions) else do (Actions) If TargetPoint != No Point Then Environment - Execute Marine - Guass Rifle (Damage) at TargetPoint from PlayerUnit Else Sound - Play Immortal_AttackLaunch for (All players) (at 50.0% volume, skip the first 0.0 seconds)And that's about it, there might be more things you need for me to post but the other things are only the traceline and reload things and stuff, which I haven't touched. Thanks again in advance for any help
Edit: Ew dunno why the trigger text came out that ugly :(