by Nyove » 14 October 2020, 15:13
Hey Unreal Engine 4,
First, use 'Call Trigger 'B' when Gun 'A' fired' trigger action, linking your gun to a trigger, let's call it trigger A.
-
Next, create a timer with 0 delay and enabled on start, targeting another trigger which creates a variable with the ammo count of your gun, let's call it ~ammoCount.
-
In trigger A, use trigger action 'Add value B to value of variable A', setting B with -1 to deduct 1 from the ~ammoCount variable each time the gun fired.
-
In the same trigger, add a trigger action after the deduction which checks if the ~ammoCount variable equals to 0.
'Continue trigger actions execution only if variable 'A' equals value 'B''
-
Below that trigger action, change the gun's fire rate to 0 as well as forcing it to spawn 0 projectile.
'Change Gun 'A' speed multiplier to value 'B''
'Force Gun 'A' spawn 'B' projectiles per shot'
-
After that, activate a timer (disabled on start, delay depends on how long you want the gun to reload for).
-
This timer executes another trigger which sets the gun's speed multipler and spawn projectiles back to 1 (or whatever you want).
Best regards,
Nyove
Proud to be part of something meaningful.
Need any assistance? Join the PB2 discord server at https://discord.com/invite/Bhe9rNz or raise a support ticket at https://www.plazmaburst2.com/support
Contact me on discord for quickest reply possible.