Jump to content
Sign in to follow this  
Clarentavious

Scripting question

Recommended Posts

Hi people, I just have a simple, one time, specific question I need answered.

If any of you have ever tried placing an empty SCUD Launcher on a map, you can board it as a driver. From here you can actually launch a SCUD missile.

I am trying to set up a simple trigger and its not working.

I know all of the trigger fields are ok (like Detected by East, I've set off other triggers), but I don't know how to direct the game to launch a SCUD I am thinking there is a specific command for the activation.

I thought maybe a simple unit action action would work, but I guess not.

So let's say I named my SCUD "goub" So I thought my string should look like

goub action ["Launch SCUD"]

But it doesn't work. The in game command is labeled "Launch SCUD" to lower the rail and point the missile upward. To fire the missile there is an additional "Start SCUD"

What am I doing wrong? I don't have he bold or italics because I am not used to this forum. Just need a little help learning OFP code.

Thanks for any assistance.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Clarentavious @ Feb. 22 2003,12:44)</td></tr><tr><td id="QUOTE">Thanks.

And geez what a simple answer, silly me for not being able to find that out  wink.gif<span id='postcolor'>

Sometimes we really CAN'T see the forest through the trees. LOL wink.gif

Share this post


Link to post
Share on other sites

Here's a script to do what you want :

Causes a scud launcher to raise the scud and wait for a desired

amount of time, then launch.

2 parameters needed:

1. Scud launcher. (Object)

2. Seconds between pre-launch and launch. (Number)

Example how to use:

TRIGGER:

Activation: Whatever needed

On Activation: [scud_1, 120] Exec "LaunchScud.sqs"

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Get the parameters given

_scud = _this Select 0

_wait = _this Select 1

; Check for valid time span (no less the 10 sec to raise scud)

?(_wait < 10): _wait = 10

; Raise the scud

_scud Action ["SCUD LAUNCH"]

; Wait for launch

~_wait

; Launch the scud

?(Not(Alive _scud)): Exit

_scud Action ["SCUD START"]

Exit

<span id='postcolor'>

wink.gif

P.S. I got this from Chris's OFP Script Editor...A really useful tool that has helped me hugely.Strongly recommended! wink.gif

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  

×