Home   Help Search Login Register  

Author Topic: Helicopter Extraction Script... Help ! Advanced !  (Read 614 times)

0 Members and 1 Guest are viewing this topic.

Sphinx

  • Guest
Helicopter Extraction Script... Help ! Advanced !
« on: 27 Jun 2003, 19:46:03 »
I need someone to do a lil scripting for me.

My mission is very awsome ! :D One problem...

I wanted it so at anytime.. the group leader can call in a chopper extraction.. for say.. to screwed to fight back..... Then 0-0-1.. a chopper comes in and lands wherever the Group is... picks em up... takes em... they fail the mission. (Ill use a trigger for that..)

Now if they complete the objectives... Papabear will tell them to call in the chopper when ready (Or it comes by itself.. whatever is better.) And takes them off the island.. and they complete the mission (With a trigger.)

Now.. I dont know if this would be accurate... but.. if there were only two soldiers in the group left... would they send a chopper for them? (They are Delta Force)

I want to make this mission fun.. and realistic... Ive already added the blood addon... and im working on that damn tank shock blast... if youd like to help me test it... ill let you.. but please let it be the person who helps me out ;) Sphinx10@pacbell.net

Testers are still cool.  ;D

Thanks Sexxy Scripters !

VUSN042

  • Guest
Re:Helicopter Extraction Script... Help ! Advanced !
« Reply #1 on: 27 Jun 2003, 21:59:02 »
Okay, there are better scripts around the place nowadays, but here's a simple dustoff/extraction script I wrote about a million years ago...  You'll want to delete the '*** sideRadio "Mic_Out"' lines, or create a custom sound for yourself.  It just plays a bit of static for keying the mic.  Edit the 'sideChat' comms lines to say what you want.

I initialise the extraction mission helos with:-  this flyInHeight 0; this action [STR_ACTION_ENGINEOFF, this]  - in the init field to keep them from starting up, make sure you have both helos sitting on a helipad though.

It's simple and crude:  helos just fly point to point from airbase to extract location.  Don't call the mission again while it's already running, confuses the hell out of the AI ;-).  The AI can also have problems with landing if the area isn't very flat, and sometimes the AI can just do weird things for no apparent reason.  Once the helos hit dirt, you've got a limited amount of time to get onboard before they leave without you, don't remember exactly, 45-60 seconds maybe.  If you have a squad with you, command them to get onboard and wait for them to get in before you climb in yourself.


And yes, they would send helos for just the two men, thought it would depend on the exact circumstances and their situation.

---
Code: [Select]
; pickup the passed parameters
;   The helo to be used for the dustoff mission.
_evac = _this select 0

;   The helo to be used to escort the dustoff mission.
_escort = _this select 1

;   The LZ where the dustoff mission will return to land.
_lz = _this select 2

;   The unit calling for dustoff
_dustoff = _this select 3

;   The helipad object used for the endZone LZ (suggest use invisible helipad).
_dustoffTarget = _this select 4


; get some position info
;   The position of the unit calling for dustoff at the time it was called in.
_endZone = getPos _dustoff

;   The position of the return LZ
_base = getPos _lz

; Make sure both helos are healthy.
_escort setDammage 0
_evac setDammage 0

; call in the dustoff mission via radio
_dustoff sideChat "Requesting extraction, Echo Charlie One Niner Red...  Taking heat."
_dustoff sideRadio "Mic_Out"
_dustoffTarget setPos _endZone
~8

; helos start up.
driver _escort action [STR_ACTION_ENGINEON,_escort]
driver _evac action [STR_ACTION_ENGINEON,_evac]
~18

; acknowledge dustoff mission and send the helos on their way
_evac sideChat "Copy your Echo Charlie One Niner Red.  Angel flight is pitch-pull for the end-zone in 15.  Hold tight Lost Dog, cavalry is on the way..."
_evac sideRadio "Mic_Out"
~10

_evac sideChat "Alpha  Whiskey, Angels are pitch-pull for Lost Dog mission, Echo Charlie One Niner Red, will advise ETE at airborne soonest, REDLIGHT in 3+40."
_evac sideRadio "Mic_Out"
~5

_escort commandMove _endZone
_escort setBehaviour "COMBAT"
_escort flyInHeight 50
_evac commandFollow _escort
_evac flyInHeight 25

; wait till arrived at dustoff location
@unitReady _escort

_evac sideChat "Lost Dog, Angel...  we are overhead your position, pop smoke and standby to extract."
_evac sideRadio "Mic_Out"

; then get to the dirt and wait for dustoff unit to board...
_evac commandMove _endZone
@unitReady _evac

; okay, this bit is a pain in the arse, BIS should really get their AI fixed up here...
~10
_evac land "GET IN"
~8
_evac flyInHeight 0
~5
@unitReady _evac

_dogTimer = 9
#dogLoop
~5
?(_dustoff in _evac): goto "dogLoop1"
_dogTimer = (_dogTimer - 1)
?(_dogTimer >= 0): goto "dogLoop"

#dogLoop1
~5
_evac flyInHeight 30

; then fly back to base
_evac commandFollow _escort
?(_dustoff in _evac): _evac sideChat "Alpha  Whiskey, Angel flight is inbound RTB, have Lost Dog on board."
?!(_dustoff in _evac): _evac sideChat "Alpha  Whiskey, Angel flight is inbound RTB, negative tally Lost Dog, repeat no tally on Lost Dog."
_evac sideRadio "Mic_Out"
;_escort setBehaviour "CARELESS"
~5
_escort commandMove _base

; wait till arrived at base LZ
@unitReady _escort

; then land the evac helo
_evac commandMove _base
@unitReady _evac

_evac land "LAND"
~8
_evac flyInHeight 0

@unitReady _evac

; then land the escort helo
_escort land "LAND"
~8
_escort flyInHeight 0

; Resup the team
@unitReady _escort
~25
_evac setFuel 1
_evac setDammage 0
_escort setFuel 1
_escort setDammage 0

; all ready for another dustoff mission...
_evac sideChat "Alpha Whiskey, Angel flight on the ground and clear."
_evac sideRadio "Mic_Out"

exit
« Last Edit: 27 Jun 2003, 22:02:09 by VUSN042 »

Sphinx

  • Guest
Re:Helicopter Extraction Script... Help ! Advanced !
« Reply #2 on: 27 Jun 2003, 22:06:56 »
Is there anyway you can update that to make it better ?

I want it so.. if the chopper is shot down.. there is a slight chance it might happen.. depending on how the player plays... but... make it so they have to walk a safe zone...... but.. i dont know if that would be accurate or not.. but.. make it better.. so it waits for you no matter what... I know its possible...

Would it be better to throw down a smoke ? Or use the radio.. cause.. this is a mp mission.. and one if the leader dies and leave another in charge.. that second leader would have a different voice.. so how would i make it so each team member had a voice command if they were in charge of the group ? 8 People in this group.

I might add voices later on.. thats why i need this
« Last Edit: 27 Jun 2003, 22:17:54 by Sphinx »

VUSN042

  • Guest
Re:Helicopter Extraction Script... Help ! Advanced !
« Reply #3 on: 29 Jun 2003, 00:49:29 »
Is there anyway you can update that to make it better ?
Hehe, the reason it's old, crude and simple is because I don't have the time to mess with it, sorry man.  There are other better and more flexible scripts available off the editor depot and around the place if you would like something more from it than this.

I want it so.. if the chopper is shot down.. there is a slight chance it might happen.. depending on how the player plays... but... make it so they have to walk a safe zone......
You lost me there, if you mean you want the squad to have to get to a safe LZ, then you can just use triggers to enable the radio command when they're in a designated safe zone.

make it better.. so it waits for you no matter what... I know its possible...
Of course it's possible, but I wrote it that way on purpose.  In the real-world, the SAR flight isn't going to hang around and wait for you all day.  If you want them to wait longer, find this line and change the value from 9 to something bigger:

 _dogTimer = 9

If you want them to wait forever, then look futher down for this line

_dogTimer = (_dogTimer - 1)

and comment it out or delete it.


Would it be better to throw down a smoke ? Or use the radio.. cause.. this is a mp mission.. and one if the leader dies and leave another in charge..
Well that's up to you, it's your mission.  You can call the script by radio or by any other trigger you care to devise.