Jump to content
Sign in to follow this  
FallenPaladin

A complex scripting problem

Recommended Posts

tony.stowe@tn.ngb.army.mil needs some help!!!

Unfortunately my skills were corrupted the last four months, because I didn`t do any scripting in that timeframe   sad.gif

I would really appreciate if anyone of you could answer his questions here in the forum and/or send him an email.

Thanks,

Fallen

Here it goes:

I tried to post onto the forum but kept getting a message stating that I didnt have the privilege to doing so. . .

Would you mind helping me with my problem for scripting. I am currently still using OFP: CWC v1.46. I am just trying to really get into the scripting but cannot seem to make this work.

I have three squads of 11x men that are participating in an air assault mission in a hot LZ. The 1st and 2nd Squads are making the initial attack while the third squad is held in reserve.

Script #1: I need for the third squad, who is currently aboard a UH-60 MG - but grounded, to repeatedly evaluate the strength of the first two squads. If either of the first two squads strength gets below FIVE then I want the third squad to take off and move to that squads location and conduct my eject.sqs to reinforce that squad and continue the mission.

Script #2: I want to have all of the helicopters to return to base and shut down (land land I suppose) and wait on a radio call from the play (or the AI) once the mission has been completed. What I would like is for the script to evaluate if one or all three squads are in the objective area and if so to send only the required number of helos to pick up the number of soldiers left alive. Of course, if only one helo remains, then it might have to make several trips to pick up all of the troops.

I hope that this is possible and that you dont mind helping me, or sending me to someone that can help me. thanks.

Tony

Share this post


Link to post
Share on other sites

needed :

name of all three groups : grp1,grp2,grp3(backup)

                             helis : hel1,hel2,hel3

           base helipads (H): h1,h2,h3

script #1:

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

hel3 setBehaviour "careless"

hel3 setSpeedMode "normal"

@((count units grp1)<5 or (count units grp2)<5)

?((count units grp1)<5):hel3 move getPos leader grp1

?((count units grp2)<5):hel3 move getPos leader grp2

@((unitready hel3) or !(alive hel3))

hel3 setSpeedMode "full"

hel3 move getPos h3

~2

?alive hel3:[parameters] exec "eject.sqs"

@((unitReady hel3) or !(alive hel3))

hel3 land "land"

<span id='postcolor'>

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  

×