
Yoda
Joined: Jan 30, 2011
Do or do not, there is no try
|
Posted: Mar 15, 2011 11:44 AM
Msg. 1 of 4
Hi,
I am working on a weapon and I need to find a way to make it wait a second or two after you pull the trigger before firing.
The animation shows the player activating the device then throwing it, but the weapon fires the projectile as soon as the trigger is pulled. I need to delay the projectile so that it lines up with the animation.
Any ideas?
Thanks -Yoda
|
|
|

ODST72
Joined: Jul 19, 2010
Where's the rest of your platoon?
|
Posted: Mar 15, 2011 11:54 AM
Msg. 2 of 4
i think you have to put on firing delay speed i remember seeing that on the weapons tag don't remember where
|
|
|

teh lag
Joined: May 6, 2008
|
Posted: Mar 15, 2011 02:18 PM
Msg. 3 of 4
Unfortunately in my experience this is a little difficult to pull off.
Your best bet is to use a weapon charging setup such that the player must "charge" the weapon for however many seconds it takes for the "activation" part of the animation to play, and then do a spew-discharge that fires a single projectile, which then plays the "throwing" part of the animation. This of course has its downsides - if the player lets go of the trigger before the overcharge delay has passed nothing will happen - but I don't know of another way to (reliably) do this. You may want to play around with the trigger "lock" stuff in the weapon tag; you may be able to combine it with overheating behavior to force the throwing-sequence to execute all the way with one pull of the trigger, followed by an overheat to un-lock the trigger (however I am not sure about this; if overheating doesn't unlock the trigger you would just have an infinite loop of throwing the projectile until the player presses fire again).
Another option is to have firing spawn no projectile at all; you instead would have the projectile spawned in a firing effect with a delay of however long it needs to be. however, this is not very reliable and can result in the projectile frequently not going where you want it to go.
|
|
|

Yoda
Joined: Jan 30, 2011
Do or do not, there is no try
|
Posted: Mar 15, 2011 03:18 PM
Msg. 4 of 4
I thought about playing around with the trigger lock and overheating options, it might work. I believe that it would unlock the trigger when the weapon overheated because (unless I'm mistaken) that is basically how people make weapons fire in burst mode.
I hadn't thought of the Charging idea, that could be interesting. At least, as you mentioned, it would probably be reliable. Unfortunately the downside on this idea could be a real pain in the neck.
I like the last idea, I am just not sure it would be reliable enough. I guess I will just have to try each of these methods and see which one works best.
btw, just so you know what you helped with... I am working on a thermal detonator, but I don't want it to function like a Halo grenade. Instead I am trying to make it work like the grenades in games like the battlefield series. I want it to be equipt like a weapon rather than a grenade.
|
|
|
| |
|
|
 |
|