Jump to content
Sign in to follow this  
usmcrp

scripting help

Recommended Posts

Hey Guys,

We need some help, our great scripter has been activated and is going off to the sand box for awhile, we are at a loss in trying to figure this out. So, here is the situation.

1) the munitions bay opens, then the munitions can be accessed. Thus a script needed to make this all happen. Here it is.

_vehicle = _this select 0

_vehicle say "BayOpen"

_vehicle animate ["bay_ind",1]

_vehicle animate ["M_BayL",1]

_vehicle animate ["M_BayR",1]

_vehicle animate ["M_BayLa",1]

_vehicle animate ["M_BayRa",1]

? "\ca\air\AIM9XSidewinder" in (magazines _vehicle) : _vehicle addweapon "\ca\air\AIM9XSidewinder"

? "\ca\a10\AGM65" in (magazines _vehicle) : _vehicle addweapon "\ca\a10\AGM65"

? "\ca\air\AGM114Hellfire" in (magazines _vehicle) : _vehicle addweapon "\ca\air\AGM114Hellfire"

? "\ca\air\gbu12" in (magazines _vehicle) : _vehicle addweapon "\ca\air\GAU12"

(driver _vehicle) selectweapon "\ca\air\AIM9XSidewinder"

(driver _vehicle) selectweapon "\ca\a10\AGM65"

(driver _vehicle) selectweapon "\ca\air\AGM114Hellfire"

(driver _vehicle) selectweapon "\ca\air\gbu12"

[_vehicle,""] exec "\F35B\scripts\F35_Fired.sqs"

;FINISH

goto "Exit"

#Exit

exit

That opens the munitions bay and this script let's you access the munitions.

_plane1 = _this select 0

_current = _this select 1

_weapon1 = "\ca\air\AIM9XSidewinder"

_weapon2 = "\ca\a10\AGM65"

_weapon3 = "\ca\air\AGM114Hellfire"

_weapon4 = "\ca\air\gbu12"

_col = [0,0,0,0.4]

_col2 = [0.7,0.7,0.7,0.5]

_col3 = [0.75,0.75,0.75,0.7]

? _current == _weapon1: goto "MissileFired"

? _current == _weapon2: goto "MiniGunFired"

? _current == _weapon3: goto "MissileFired"

? _current == _weapon4: goto "MissileFired"

? _current == _weapon5: goto "MissileFired"

exit

;=========================================

;Sidewinder Launched

;=========================================

#MissileFired

_pos = [1,-1,-0.2]

_x = sin(getdir _plane1)

_y = cos(getdir _plane1)

drop ["cl_basic", "", "Billboard", 1, 3, [(_pos select 0) - 0.1*_x, (_pos select 1) - 0.1*_y, _pos select 2], [0,-1,-0.5], 1, 1, 0.80, 0, [0.5,6],[_col],[0],0.1,0.1,"","",_plane1]

drop ["cl_basic", "", "Billboard", 1, 3, [(_pos select 0) - 2 * _x, (_pos select 1) - 2 * _y, _pos select 2], [0,-1,-0.53], 1, 1, 0.80, 0, [2,6],[_col],[0],0.1,0.1,"","",_plane1]

drop ["cl_basic", "", "Billboard", 1, 5, [(_pos select 0) - 4 * _x, (_pos select 1) - 4 * _y, _pos select 2],[0,-1,-0.55], 1, 1, 0.80, 0, [2.5,10],[_col],[0],0.1,0.1,"","",_plane1]

drop ["cl_basic", "", "Billboard", 1, 5, [(_pos select 0) - 6 * _x, (_pos select 1) - 6 * _y, _pos select 2],[0,-1,-0.55], 1, 1, 0.80, 0, [3,10],[_col],[0],0.1,0.1,"","",_plane1]

;=========================================

;M61 Launched

;=========================================

#MiniGunFired

_z = (velocity _plane1 select 2) -5.5

drop ["\F35B\casing.p3d", "", "Billboard", 1, 3, [0,3,-1], [0,0,_z], 1, 1, 0.50, 0.01, [0.1,0.1],[_col2],[0],0.1,0.1,"","",_plane1]

exit

Well we can't seem to get it to work without our god scripter so any help is much appreciated.

S/F

USMCRPand team.

Share this post


Link to post
Share on other sites

This is an addon scripting question, not mission editing and scripting.

Which part isn't working?

Share this post


Link to post
Share on other sites

Bay weapons the problem ?

Maybe you should download and open scripts used on the OFP Nighthawk and the Commanche chopper ....

Share this post


Link to post
Share on other sites

Wait a minute this was already posted before, I remember responding to it. Anyway your problem is that your weapon/magazine classnames are wrong. For some reason you want to use the models for weapon classnames, but... well... that just doesn't work. You'll find the correct weapon and magazine classnames here. Ex:

? "4Rnd_Sidewinder_AV8B" in (magazines _vehicle) : _vehicle addweapon "SidewinderLaucher"

Of course that's only if you're using the BIS weapons. Did you happen to config your own weapons for the addon?

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  

×