Jump to content
Sign in to follow this  
1212PDMCDMPPM

Needing help with RHS vehicle scripting

Recommended Posts

I'm sorry but I'm completly lost about scripting with some RHS vehicles:

- GAZ 66 (R-142N): how can I detect that the mast has been deployed ?

- 9P1291M: how can I execute the launch sequence by script ?

I'm taking about: outriggers-down, missile bay-open, pylon-up, select a target(firing position) and launch.

Thanks for your help !

Share this post


Link to post
Share on other sites

Honestly, I never understood the EH part of the GAZ 66, and never saw anything about the 9P1291M, but may be I just missed it...

Share this post


Link to post
Share on other sites
Honestly, I never understood the EH part of the GAZ 66, and never saw anything about the 9P1291M, but may be I just missed it...

I would also need some info on how to set the 9P1291M into "Firing Position" with a script, did you ever find out how to do it?

Making the AI launch the nuke itself is pretty simple once you have set the 9P1291M into "Firing position", all you need to do is "scud1 doTarget target1" and "scud1 doFire target1" and the AI will aim and fire the nuke at the target. Do note that the AI will not launch the nuke if the 9P1291M is not facing the target (can't fire on a target behind it) or the target is too close.

So to make a script that can fire at any target on the map one would need to:

  1. turn the 9P1291M towards the target (if the vehicle isn't already facing the target).
  2. set the 9P1291M into the "Firing Position".
  3. and then use doTarget and doFire to launch the nuke.

Any info on how to set the 9P1291M into the "Firing Position" would be appreciated.

Share this post


Link to post
Share on other sites

Sorry, I should have replied to myself (tested in 0.37 only)

For the 9P1291M:

[miss1,1] spawn rhs_fnc_ss21_AI_prepare;

[miss1, getMarkerPos "target"]spawn rhs_fnc_ss21_AI_launch;

For the GAZ66:

variable_to_check = _unit getVariable ["tf_range", 1];

variable_to_check = 1 : GAZ 66 antenna never deployed

variable_to_check = 50000 : GAZ 66 antenna deployed

variable_to_check = 10000 : GAZ 66 antenna retracted

Share this post


Link to post
Share on other sites

Hi, Im a bit of a beginner, I put your code in for the scud launcher in the init and says its wrong. How can I do this?

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  

×