Jump to content
Sign in to follow this  
hardrock

Weapon modes via Action-Menu possible?

Recommended Posts

Some of you might know that you can assign weapon modes for a weapon in the config.cpp, like for the M16 Single, Burst and Full-Auto. Is it now somehow possible to do these different modes but using the action menu to switch between them, instead of having all of them appear as a weapon when you switch weapon.

I mean something like with the magazines, there's "Reload HEAT" for example, I would like to have something like that but all the modes should use the same magazine. Means, equal in which mode you shoot, one magazine will get one shot emptier (in opposition the different mags like HEAT and AP, where you have two different magazines)

I hope somebody understands what I mean crazy_o.gif

Share this post


Link to post
Share on other sites

Yes that is possible.. but it requires some scripting plus the use of fire-eventhandler of the vehicle that uses the weapon.

The idea behind is, that you fire a dummy weapon and then let a script (triggered by fired-eh) fire the "real" weapon in the right firemode.

Share this post


Link to post
Share on other sites

That's a good start at least. I'm not afraid of scripting at all, it's just that I wanted to let the engine handle as much as possible. For example is it not possible to fire guided weapons without a guidance-script then.

I also wanted to use this method to easily create a possibility of different weapon salvos without using heavy scripting, since you can modify the burst values in the different weapon modes. But it looks as if it's not possible without scripting, so I'll have to script it.

Share this post


Link to post
Share on other sites

Couldnt you have 2 guns in the config, same model, except one has full auto, one has burst, one has singlel; the action menu would have actions like 'switch to burst mode' and it'd make him play a simple 'switch' anim, then replace the gun he is using with the corresponding gun (with burst mode, single, etc) and have him selectweapon it?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×