Home   Help Search Login Register  

Author Topic: Medivac For Wounded  (Read 1043 times)

0 Members and 1 Guest are viewing this topic.

Geosword

  • Guest
Medivac For Wounded
« on: 09 Feb 2003, 00:26:49 »
Okay folks.  My brain hurts so I am going to make you all think for me before I pull out my last grey hair.   I am writing missions for a Vietnam campaign using SEB's MOST excellent Nam v2.0 addon.    I am putting the finishing touches on perhaps my greatest mission to date.  A lot going on here.   I decided while I was sitting there that there was just thing missing, MEDIVAC.   So I started building a script that is activated on a radio call from the unit leader.  This is what it looks like so far:

; Start a Green Smoke Shell
_counter = 0
_leader = leader sqd2

_leader SideRadio "Medivac"
~4
MashPilot SideRadio "Mash32"
~30

_sx = getpos smoke select 0
_sy = getpos smoke select 1

_smokeit = "SmokeShellGreen" camcreate [_sx, _sy, getpos smoke select 2]

; Check to see who has greater than 50 pct damage to them and is still alive.
#Check
_man = [man1, man2, man3, man4, man5, man6, man7, man8, man9, man10, man11, man12]
_wounded = _man select _counter
_woundlvl = getdammage _wounded
? (_woundlvl >= .5) : _wounded AssignAsCargo Mash32
_counter = _counter+1
? (_counter == 11) : goto "End"
goto "Check"

#End
exit


The smoke pops, the medivac chopper zooms in, lands and hovers at the LZ and won't leave until every unit that is injured in your unit has been put aboard the chopper.   Once that happens the chopper lifts off and flies back to base with your wounded units on board while you stay and fight on.
 
This is what I cannot figure out.    I need to know WHO is in the cargo space of the Medivac chopper so that I can unassign them from your squad and then delete them out of the game since they won't be coming back.   There is another problem too.  The UH-1 Medivac choppers can only carry 4 people in the cargo area.  So if there are more than 4 injured guys in your unit well... they run after the chopper after it dustoffs and heads back to base.. Which admittedly was DAMN funny to watch..
 
So In summary.  2 Questions:
 
1.  How do I get an array of WHO is in the chopper EASILY.   I know about the Unit IN Vehicle command but I don't think that is it.  There should be way to ask a vehicle WHO is in your cargo space and what are their names so they can be handed off to a script snippet that removes them from the game.
 
2.  More than 4 injured guys Equals a really funny display of stupidity.  How do we get the chopper to come back for the rest once it removes the first batch from its cargo?

Yours Truly, Captain P.J. Smitty served with a white win under glass.


 

Offline libriut99

  • Members
  • *
  • 2b or not 2b, who cares ???
Re:Medivac For Wounded
« Reply #1 on: 09 Feb 2003, 19:31:41 »
just from the top of my head , but ,
can U make a loop that will call the chopper only wnen there are wounded soldiers and inside it build an array that will only accept 4 men
before 'Zee germans get there ...

Geosword

  • Guest
Re:Medivac For Wounded
« Reply #2 on: 09 Feb 2003, 21:00:39 »
Well it is in a loop called by radio.   But I am semi new to building arrays like this.   I think I will need two variable holders.   One to store ALL the wounded and then have that array pass 4 others at a time to the choppers cargo spacee until there are no more men in need of a medivacing.  I think.

 ???

Offline libriut99

  • Members
  • *
  • 2b or not 2b, who cares ???
Re:Medivac For Wounded
« Reply #3 on: 13 Feb 2003, 08:28:48 »
Geosword

if you've found a solution I would like to hear about it .
and if your mission is in its final stages I'd like to play it .
before 'Zee germans get there ...

Geosword

  • Guest
Re:Medivac For Wounded
« Reply #4 on: 14 Feb 2003, 00:25:32 »
You bet.   You will need the SEBNam Pack V2.0 and the Napalm addon to play this mission.


mcnils

  • Guest
Re:Medivac For Wounded
« Reply #5 on: 14 Feb 2003, 04:25:34 »

One idea + one doubt (lol):

The idea:
What about to bring the injured units to a medic camp, heal them all, and then fly them back to the LZ??

The doubt:
What happens if the player is one of the injured people witch for the chopper comes?
I mean he cant just be, deleted.. lol (doesnt work anyways).


Thats all, byez ^^'
« Last Edit: 14 Feb 2003, 04:29:47 by mcnils »

mcnils

  • Guest
Re:Medivac For Wounded
« Reply #6 on: 14 Feb 2003, 04:28:37 »

One more idea,

What about to have a medic or two in your combat group?
medi-evac would be obsolete then (if the medics dont get killed).

Offline libriut99

  • Members
  • *
  • 2b or not 2b, who cares ???
Re:Medivac For Wounded
« Reply #7 on: 14 Feb 2003, 07:35:44 »
medivac can be used to be a glorious way of deleting the dead from the battlefield.  I think that should be the main use for it .
before 'Zee germans get there ...

Trex2001

  • Guest
Re:Medivac For Wounded
« Reply #8 on: 17 Feb 2003, 16:14:23 »
Maybe you try the _crew=crew vehicle command, resulting in an array of all units in the medivac. After that, use

_injured=_crew-[driver vehicle,gunner vehicle]

now _injured should contain an array of all units in cargo, hopefully

I havent tried it, maybe it helps

Tell me if it worked...