View Full Version : Weapon scripts? possible?
DragoFire
Feb 24 2003, 01:05
I'd like to know if it is possible to add a script to a CPP for an weapon?
What I'm trying to do is script the fire and damage for a Mk-77 napalm bomb. I know there's been talk about this weapon, but nothings happened!
As I've got a limited number of things to finish for my Addon, and had this weapon on the list of things to do I'm hope someone know the answer.
DragoFire
jacobaby
Feb 24 2003, 17:57
You can call the script you need from within the cpp.
Use an eventhandler of suitable type.
If you currently test the thing via an init line command, you can use an INIT eventhandler.
Theres a thread about it here;
http://www.flashpoint1985.com/cgi-bin....t=24828 (http://www.flashpoint1985.com/cgi-bin/ikonboard301/ikonboard.cgi?act=ST;f=51;t=24828)
TJ
DragoFire
Feb 24 2003, 22:39
I've seen that before, what I'm trying to find out can a AMMOCFG or WEAPONCFG have a script attached, not the VEHICLECFG in the CPP.
DragoFire
Regarding internal scripting in individual weapons addon, could anyone reprly to this:
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">If it were possible, the best solution for me would be:
Rifle has new Action available - Attach Suppressor and Detach Suppressor. When installed, any BIS ammo in the rifleman's inventory should be changed to my new suppressed ammo. Any further mags he picks up should be converted when he picks them up. If he drops them into a cargo, they convert back to BIS mags (or disable drop ability if that's easier). If he dies, all mags must convert back to BIS mags as well. This way, suppressed ammo can only exist in a soldier's inventory. There would also have to be a suppressor proxy that appears on the rifle (using the Mortar reload animation!!http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/wink.gif. When the suppressor is removed, all inventory ammo reverts to BIS ammo.
Is there any way this can be done, from a config.cpp?? Any other ideas with similar end results are welcome. I don't want two ammo types available to the soldier. If he has a suppressor, then it should be suppressed gunfire, and he should be able to use any BIS mags from the field.
Help!
[/QUOTE]<span id='postcolor'>
jacobaby
Feb 27 2003, 21:09
That may be possible by spoofing it.
The ammo used could be SD by default, but if the muzzle animphase is off you could play a sound every time a round is fired or something similar, keep thinking of ways to make it appear as if is is "proper"
Thanks for bringing that up 9mm, I haven't spent much time in this section of the forum before, but it's definitely my weakest area, so expect to see me around a lot asking lots of dumb questions.
Jacobaby, where would you chech the muzzle animphase, and how would you get a different sound to play with every round fired?
Where can I learn more about animphase? Sounds like the key to having different part of the weapon visible at different times.
DragoFire, if you find anything out about calling scripts from Ammo or WeaponCfgs, let me know. There's a lot of stuff I want to try, but I don't really know how to go about doing it yet.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.