Alrighty, so basically I really dislike how most flame thrower weapons in the game pulse. I like the idea that if you shoot a flamethrower that flames will stream out until you stop firing.
To create this effect I did use a persistent effect with offsets much like you'll see in the tutorials around the forums here. I matched up the period durations of the persistent, the animation durations of the model I used, and the weapons firing period to create a stream like effect. Problem is this turned out to be .1 so as you could imagine I am having trouble creating the initial weapon firing sound since its just firing over and over really really fast.
How exactly would I go about this if I wanted the initial sound to play once at the beginning of this weapons usage instead of 50 million times within a few seconds.
The only way I would know:
You add a second effect to the weapon effect which applies a behavior to the attacking unit.
This effect has a duration of 0.2 (something above your firing speed) so it refreshes itself as long as you keep firing.
The behavior would then create the sound as it's initial effect (or, if you want the sound to be played every X second you can use the behavior's periodic effect for that).
Question, If this behavior was refreshed while it was still active would it play its initial effect every time it was refreshed or just the first time its applied?
The Behavior has several fields for applying effects to it:
Initial, Refresh, Periodic and Expiration.
The Initial effect will only occur when the unit receives the behavior, not when it's re-applied (this is why it's important to have the behavior last a little longer than the attack cooldown).
Alrighty, so basically I really dislike how most flame thrower weapons in the game pulse. I like the idea that if you shoot a flamethrower that flames will stream out until you stop firing.
To create this effect I did use a persistent effect with offsets much like you'll see in the tutorials around the forums here. I matched up the period durations of the persistent, the animation durations of the model I used, and the weapons firing period to create a stream like effect. Problem is this turned out to be .1 so as you could imagine I am having trouble creating the initial weapon firing sound since its just firing over and over really really fast.
How exactly would I go about this if I wanted the initial sound to play once at the beginning of this weapons usage instead of 50 million times within a few seconds.
The only way I would know:
You add a second effect to the weapon effect which applies a behavior to the attacking unit.
This effect has a duration of 0.2 (something above your firing speed) so it refreshes itself as long as you keep firing.
The behavior would then create the sound as it's initial effect (or, if you want the sound to be played every X second you can use the behavior's periodic effect for that).
@s3rius: Go
Question, If this behavior was refreshed while it was still active would it play its initial effect every time it was refreshed or just the first time its applied?
The Behavior has several fields for applying effects to it:
Initial, Refresh, Periodic and Expiration.
The Initial effect will only occur when the unit receives the behavior, not when it's re-applied (this is why it's important to have the behavior last a little longer than the attack cooldown).
Works beautifully. Thank you for the quick reply.