
Yoda
Joined: Jan 30, 2011
Do or do not, there is no try
|
Posted: May 29, 2012 11:16 AM
Msg. 1 of 6
I am trying to make a weapon that has an overcharge function (like the plasma pistol), but when I try it in-game instead of charging up and holding it just repeats the charging animations over and over again.
Even once I release the trigger and fire the shot, it still keeps playing the overcharge animation until I do something to stop it (like change weapons, or fire normally)
This is the first time I have tried an overcharge function, so is there anything in particular I need to know to be able to do this?
Thanks -Yoda
|
|
|

teh lag
Joined: May 6, 2008
|
Posted: May 29, 2012 10:02 PM
Msg. 2 of 6
You must set the "looping frame index" field in the animation being used for the overcharge. This is the frame which the animation will loop back to when the weapon is continually overcharged. Also if your animation uses a secondary trigger to represent the charged shot, be sure you have a fire-2 animation as well (also overheating animations, including o-h-s-enter, if your gun can overheat as a result of overcharged fire).
|
|
|

Yoda
Joined: Jan 30, 2011
Do or do not, there is no try
|
Posted: May 30, 2012 10:05 AM
Msg. 3 of 6
Quote: --- Original message by: teh lag You must set the "looping frame index" field in the animation being used for the overcharge. This is the frame which the animation will loop back to when the weapon is continually overcharged. Also if your animation uses a secondary trigger to represent the charged shot, be sure you have a fire-2 animation as well (also overheating animations, including o-h-s-enter, if your gun can overheat as a result of overcharged fire). Thank you for your response. That is exactly what I was missing, it works perfectly now. I don't need fire-2 animations or overcharge because the weapon in question is actually a bow and arrow. I needed to be able to pull back the string and hold it till I want to release, and the best way I could think of was to use an overcharge function. Is there a way to make it so that (at least to some extent) the arrow is more powerful if it is held longer? Kinda like the plasma pistol can fire a partially charged shot, but the fully charged shot is more powerful.
|
|
|

teh lag
Joined: May 6, 2008
|
Posted: May 30, 2012 10:24 PM
Msg. 4 of 6
I'm not really sure what you mean - the plasma pistol fires two projectiles: the standard bolt and the overcharged bolt. If there's anything to the damage caused by an OC bolt tied to the length of time you spend holding the charge, it's not known to me. You may be able to hack something together to have different projectiles fire based on how long the trigger is held but you probably would have to do some serious experimentation to make it work; off the top of my head I can't think of a reliable way to do it. The "overload time" field in the first trigger block stands out to me as something to look into (if it does what it says you'd be able to have the second, more powerful arrow automatically fire if the primary trigger is held for more than a given amount of time) but I also remember that field either does not work like it should or does not work at all.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: May 30, 2012 10:30 PM
Msg. 5 of 6
If you are fine scripting the projectiles rather than having the guns fire them, just connect an effect to the charging function block, the effect damages a nearby object, when it stops getting damaged, have the script create the projectile that matches the damage given to the object, etc.
|
|
|

Yoda
Joined: Jan 30, 2011
Do or do not, there is no try
|
Posted: May 31, 2012 09:07 AM
Msg. 6 of 6
Thanks a lot for ya'lls help, and nevermind on the last thing. I was confused about something, and so the question came out odd, and I don't need to do that anyway.
|
|
|
| |
|
|
 |
|