Jump to content
Sign in to follow this  
SCA Jolly

Rockin' around

Recommended Posts

Have some problems with my mission: 2 A-10s start out a little SouthEast of Malden. They (leader=player, 2nd=buddy) have been assigned to some attacks and some recce. Because they're oly 2 and the commies are many, I want to assign 2 Cobras to do some work. The Cobras should attack when ordered to, but not in group with the player. How do I make them attack the units I want to (without attacking others, nearby) just by a click? They should return to the game logic amed "base" when done with the unit. Like if I selected 0-0-# (radio) and then clicked a unit, so they could attack it...

Also, my wingman, Buddy, should stay close to me, without engaging without my order. HOW???

Any help appreciated smile.gif

Henning

Share this post


Link to post
Share on other sites

Use the command

unit1 DoFire unit2

in an activation field (your radio trigger) for the cobras.

They wingman will be controlled by the player, you tell him to engage or not in the communications menu.

Share this post


Link to post
Share on other sites

Hey Jolly, I don't think Intruder is on the right track here, since you need a way to define in realtime just what "unit2" is supposed to be.

Might I suggest the following...

Radio (0-0-1) -- Start by perhaps making a radio call...."November attack force, we are at <your position> and are requesting your assistance". "Roger Alpha, we are hot to go..." Or something...

Set your choppers to fly to your current position, and then make them join your group! They don't have to fly with you in formation... Once they are in your group, you can designate targets for them easily...

Radio (0-0-2) -- Detach them from your group and send them home... "Thanks November, we'll call again if we need you".

There is no reason why you can't have the choppers re-armed/fueled once they've landed, and be able to call on them again...

Just my thoughts...

Share this post


Link to post
Share on other sites

Thanx, Conan!! But how do I say my real position? And how do I get the choppers to land and refuel?

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 </td></tr><tr><td id="QUOTE">Hey Jolly, I don't think Intruder is on the right track here, since you need a way to define in realtime just what "unit2" is supposed to be.<span id='postcolor'>

This is how you define names

In the name field of the cobra, type unit1 (or whatever you want), in the name field of the enemy unit type unit2 (or whatever you want).

Therefore when the triger with unit1 DoFire in the activation field becomes active, unit1 (the cobra) whill fly to unit2 (enemy unit) and open fire.

Thats how you make units attack the units you want. You can also use

DoTarget instead of DoFire

Share this post


Link to post
Share on other sites

I am familiar with that way.

I think Conans way works best, at least for the moment.

btw, </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">In the name field of the cobra, type unit1 (or whatever you want), in the name field of the enemy unit type unit2 (or whatever you want).

Therefore when the triger with unit1 DoFire in the activation field becomes active, unit1 (the cobra) whill fly to unit2 (enemy unit) and open fire.

<span id='postcolor'>

I want the Cobras to attack the units that the player want to, not attack units assigned in the beginning...

Share this post


Link to post
Share on other sites

set a trigger and let it activate a radio call abilitiy for u .Now let the guys hop in their helos and with the getpos command fly to your position with all fire rules enabled. the will go in like madcat. you can update your pos if you need them again by pressing radio command again. this works great for me.

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 </td></tr><tr><td id="QUOTE">Thanx, Conan!! But how do I say my real position? And how do I get the choppers to land and refuel?<span id='postcolor'>

Please keep in mind I'm new to scripting, and I haven't checked to see if this works, but this is what I would try...

Assuming:

aP = Your Player's Name

Pilot1 = Name of the Lead Chopper's Pilot

Chopper1 = His Chopper

Pilot2 = other pilot

Chopper2 = 2nd Chopper

ChopperGroup = Group containing "Pilot1" and "Pilot2"

HeliPad1 = An "H" Helipad.

HeliPad2 = Another "H".

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

;This will get your position in x,y,z form

_MyPos = GetPos aP

;Extract x & y (don't worry about height)

_xPos = _MyPos[0]

_yPos = _MyPos[1]

;This uses the Format command to insert your East/West and North/South coordinates into the text message.

aP GlobalChat Format["November squad, our position is %1, %2.  Deploy immediately for fire support mission",_xPos,_yPos]

;Pilot of lead chopper replies...

Pilot1 GlobalChat "Roger Alpha, we are inbound to your location, ready for targeting parameters..."

;Get choppers moving

"_x commandMove [_xPos,_yPos]" ForEach ChopperGroup

;Set a low cruise altitude for entering a combat zone

"_x FlyInHeight 50" ForEach ChopperGroup

;Now they are on their way to the point you called from.  Now join them to your group.

"_x Join Group aP" ForEach ChopperGroup

;They should appear in your group status bar.

<span id='postcolor'>

So, now they are members of your group and you can assign them targets in realtime as usual.  When you are done with them, or they're out of ammo, use your second radio command to send them home...

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

;Remove them from your group

"_x Join GrpNull" ForEach ChopperGroup

;Send them to their respective helipads.

Pilot1 commandMove GetPos HeliPad1

Pilot2 commandMove GetPos HeliPad2

<span id='postcolor'>

Ok, final part... Not sure, but I think a pair of triggers are the best solution here -- called LandHeli1 and LandHeli2.  Try this -- LandHeli1 will have the condition...

(Pilot1 Distance Helipad1) < 200

...and the On Activation will be...

Pilot1 Land "Land"; Chopper1 SetFuel 1;....(and ammo, whatever is appropriate for this chopper).

And of course for the second chopper, same thing for LandHeli2 substituting Pilot2 and Chopper2 as appropriate.

Like I said, I will be surprised if all this actually works as is; you'll probably have to butcher it all to hell to get it to work, but I hope the concept is clear...

And of course, it's just a thought from a Newby scripter  wink.gif

P.S. After reading this over, I can see you really need some other stuff for polish and "idiot-proofing".  For example, if you try to call the choppers a second time, but Pilot1 got creamed in the first session, it isn't correct for him to respond to your 2nd summons.

You've got some "What if's" to deal with, but I'll leave that to you...

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  

×