Well here i am again standing on my soapbox asking the good people of the community for their expertise when it comes to init lines and such =]
now im at a point in my Arma "career" to where i want to try something, expertish, and i KNOW i dont have the scripting/config prowess to do so on my own. I HAVE searched for it, and i havent found what i wanted. What im looking for is:
(now that i finally have ACE working) MUST BE ACE and AI compatible!!!(no room for coop/multiplayer out here in iraq)
a script or radio/trigger or whatever to get this to happen:
Say my squad is in a sustained firefight. one of my riflemen takes a round and goes down (ACE Wound System),
-i patch him up without getting him up (give him whatever it takes to NOT DIE, but also not enough to get him fighting again, to simulate CLS and casualty stabilization)
-(SCRIPTING PART!) I call up a Medevac request, and a blackhawk appears say 5/10K away, requesting an LZ
-i mark an LZ on the map w/ mapclick (would prefer smoke grenade)
-the medevac bird lands at the LZ, and i carry my wounded soldier to the bird as its on the ground, and place him in the cargo of the bird (all doable by ACE)
- once the casualty is on the bird, the casualty is removed from my group (i.e. join grpnull) and the bird goes away.
Now from what i understand theres 2 ways to configure this. With a preplaced bird at a FOB/CCP/FARP somewhere on the map, and one with the game spawning one. Id prefer the first but tips on both would be awesome!
im not asking for someone to do this for me, im asking for someone to do this with me so to speak, so i can get a better handle on scripting.
little knowledge on ACE related but i asume the following will work regardless of ACE or not.
Note:
This below spoiler will auto collect fallen units, for proper call in casevac instead of running script in ACE wound/killed system part, have the unit added into a global array:
in init.sqf add this line:
Casevac_wounded_units = [];
And use the addaction or radio trigger on TL (you) to run the script and instead of _unit = _this select 0;
use _unit = Casevac_wounded_units select 0;
and domove the driver vehicle to TL POS and find a safepos near him and collect the wounded unit, or multiple units before moving vehicle back to FOB, or position.
Asuming the ACE wound system beheaves like norrins revive in some way, unit gets shot, unit falls to ground and plays wounded animation, waiting for player to come by within a set time to revive.
Open up the ACE wound/killed scripts, locate where the unit is healed by player or other AI and instead of ending or doing animation called ""Spoiler:
("" means no animation, go back to default wich is able to move again)
For auto retrieval:
run this script on unit in ACE wound/killed script instead of ending animation place this line: you should also look into various animations for lying still etc. and then add this line:
[_unit] execVM "casevac.sqf"
in casevac.sqf you need to collect unit info, by _unit = _this select 0;
now either spawn a airvehicle with BIS_fnc_spawnVehicle or just use the one you have placed in editor.
remember to create or place medics inside airvehicle to be used in the casevac, can ofc be riflemen or whatever. either preplaced or use createUnit and moveInCArgo heliname them..
Now details of possible script solution:
1:
name the startPos by _startPos = getPos heliname;
create invicble H on heli start pos and we will move it to LZ once heli is near, we can acess this later on in script by its first name (_CaseVac_LZ)
_CaseVac_LZ = "HeliHEmpty" createVehicle (getPos heliname);
3:
use waitUntil to check for once heliname is within certain distance to the safepos
4:
Now setPos the invicible H to the pos we found with safepos.
use heliname land "LAND" action on it, disembark the collecting unit or group by using unassignvehicle unit, and dogetout once heliname getPos select 2 < 1
getpos select 2 checks the Z axis of the heli, and that is height
< means left side is below right side value
1 is the height you check for to be below.
5:
now domove the casevac ground personell wich is now out of heli to getPos _unit(wounded)
6:
investigate how to carry a wounded, its in here in the forums, its a combination of playmove and attachTo
7: have the casevac ground personell move to getPos heliname.
8: waituntil {(carryman distance heliname) < 1}
9:
play the animations of dropping carried wounded, and detach it, use _unit moveInCargo heliname on wounded and assignAsCArgo on carryman, [carryman] orderGetIn true.
10: once (vehicle carryman AND vehicle _unit) == heliname
have the driver of heliname doMove to _startPos
11:
and there you can either delete all or make all sorts of advanced stuff, like getting them into field hospital, further transport etc, heal and fly them back to player and join group etc. no limits exept your own imagination.
but if player never is near there it would be no point in doing fancy landings and carrying etc...
Note: I probably spent more time on writing all this than i would have used in actually creating a working example, but you asked for a learning experience and you will touch onto many aspects of arma scripting in this so you will learn alot.
Best of luck and stay safe
Edit: Im not sure if ACE has stretchers to carry wounded on, if so use them instad of carry animation on wounded if desired, its probably a vehicle named ACE_stretcher or something and you can moveIncargo the wounded unit.
Any new mission editor or scripter in Arma2 should have read Mr Murrays Editing Guide Deluxe at least once, it still applies for A2 even though it was made for Armed Assault.
I put the module and linked it to a game logic like it said to do, my guy can call in the medevac, abort the medevac and even has a conversation with the pilot of the medevac, yet the medevac never comes.
I'm tinkering around with it to try to get it to work for me, but it seems like it should be pretty easy to use, maybe you would have better luck with it than I?
I think there was a problem with the Medevac module if I remember correctly. Can't QUITE remember what though! Was a while ago. Perhaps with the latest betas problems will be fixed.
yeah the transfer from MWR computer, to my personal computer didnt go to well. the file got corrupted somewhere in the download...sooo i go back to the MWR (Morale Welfare and Recreation, out internet area) and the damn building is packed!!! and now im working. damn!!!
so ill be sure to give you guys feedback on how this goes for me when/if i ever get the damn chance lol.
I think there was a problem with the Medevac module if I remember correctly. Can't QUITE remember what though! Was a while ago. Perhaps with the latest betas problems will be fixed.
The action dissapears when you respawn. So you can no longer call it in. Thats the problem I had with it.
MISSIONS
[co4] Delta RescueReleased | [co8] Infestation Released | [co12] Battle of Mogadishu (Black Hawk Down) Coming Soon
I've been tinkering this evening with one of Goliath's medevac scripts and I can ALMOST get it to work perfectly.
You call the chopper, which spawns at a certain position, it gets to within 700m of your position and calls for red smoke (red smoke appears in your pack)
It then sees the smoke and approaches, on touchdown a medic joins your team. You heal etc. When complete you hit an addaction and the medic rejoins the crew of the chopper and RTBs.
The problem I have at the moment is that the chopper isnt recognising the base marker and it is crashing into some buildings.
Will work more on it tomorrow. The main advantage is this does NOT require a mod, just a little script
see the medevac module is great but still, being in the army i have OCD, its not completely realistic. im trying to make it so its absolutely perfect as far as realism goes.
in my experience heres the sequence of events in a real "oh sh*t" situation.
Your squad is in contact, you get your men on line and in cover the best you can, but Pvt Snuffy is too fat and didnt run for his cover fast enough so he gets clipped by AK fire. Snuffy falls and is bleeding quite heavily from his chest. (All taken care of by the ACE Wound System). What do you do? you shoot back first of course!!!
once the enemy is suppressed by your SAW gunner (PFC Awesome) you, the TL, make a dash for snuffy's fat wounded ass. you then drag him to cover safely, so that the platoon medic can have a look at him. IF the platoon medic is not available at that very second, the soldier assesses the casualty and performs CLS (Combat Life Saving) to stabilize the casualty until the medic is there. (Also taken Care of by the ACE Wound system and Medical Supplies)
Once Snuffy's fat/dumb ass is stabilized, he is brought to a suitable HLZ for pickup. The Platoon Sergeant calls up a medevac, and the bird lands on the MARKED LZ (Smoke, Tarp, IR strobe, guy in the field waving his arms till their numb, can be anything really) (apparently taken care of by Kremator's example)
All you have to do, as a soldier, is bring snuffy to the bird and load him up. The flight medic stays aboard the bird and continues where you left off while the bird is in flight (this is kinda where im having the issue)
I can get almost ALL of that to happen, except i want Snuffy out of my group for good (to simulate a real combat casualty), be him wounded or dead, once hes on the bird.
I appreciate ALL of your guys' help with this, i just need this last little bit done and i can finally enjoy realistic medevacs!
I can get almost ALL of that to happen, except i want Snuffy out of my group for good (to simulate a real combat casualty), be him wounded or dead, once hes on the bird.
//Have snuffy join his own group after he is onboard the heli, lets wait until he is in heli.
waitUntil {(vehicle _Snuffy) == heliname};
// now snuffy is in heli and you can have him out of your group, he will join his own personal group.
[_Snuffy] joinSilentgrpNull;
PS: loved the little story, made me smile a little here in the morning