Author Topic: Arma 3 Mission editing  (Read 5649 times)

M. Spears

  • Posts: 13
Arma 3 Mission editing
« on: April 12, 2015, 08:06:56 PM »
I'm creating a mission via Arma 3's Editor and, since I'm relatively new to this still, I have a few questions.

Right now, I'm having difficulty figuring out how to set a friendly AI unit unconscious so when the player reaches him, he'll need to 1) stabilize him and 2) carry him to the LZ for MEDIVAC. Keep in mind I'm running AGM. I'm pretty sure scripting needs to be involved but at this point.... I'm lost.

Also, once the patient has been stabilized, I would like to have a new task created for the next objective to have the patient MEDIVAC'ed. I know a trigger will be involved in this, but, again, I don't know how.

If you guys can help me out, or point me in the right direction, that would be awesome.

Thanks.

NOTE: I'm aware of the Scripting Commands, Configs, and other Arma 3 assets over at the BI wiki as well as the forum. Its just knowing how and where to implement them is my problem. I'm hoping this would be a learning curve here.

SSG (Ret) Atkinson

  • 68W3O Health Care Specialist
  • Retired
  • Posts: 277
Re: Arma 3 Mission editing
« Reply #1 on: April 13, 2015, 08:58:05 AM »
Right now, I'm having difficulty figuring out how to set a friendly AI unit unconscious so when the player reaches him, he'll need to 1) stabilize him and 2) carry him to the LZ for MEDIVAC. Keep in mind I'm running AGM. I'm pretty sure scripting needs to be involved but at this point.... I'm lost.

For this you can use the following lines:

Code: [Select]
this setVariable ["AGM_AllowUnconscious", true];
[this, 999999] call AGM_Medical_fnc_knockOut;
this setDamage 0.5;

The first line allows the unit to be knocked out according to AGM.
The second line sets the unit as unconscious.
The third line sets the units damage. 0.5 gave heavy injuries to all body parts, so I would try a smaller value.

You have a few options to execute this code:

1. You could run it as is in the unit's initialization box in the editor. That will knock out the unit once the mission starts.
2. Run it via a trigger. Place the code in the ON ACT. box of a trigger. You will need to edit the code. "this" won't work. You'd have to name the unit something unique, then replace "this" with it's name. For example:

Code: [Select]
unit1 setVariable ["AGM_AllowUnconscious", true];
[unit1, 999999] call AGM_Medical_fnc_knockOut;
unit1 setDamage 0.5;

3. Run it via script. You'd still have to execute the script, probably with a trigger.

Also, once the patient has been stabilized, I would like to have a new task created for the next objective to have the patient MEDIVAC'ed. I know a trigger will be involved in this, but, again, I don't know how.

I haven't used tasks for a long time. I believe you can create them with modules in Arma 3 (Intel > Create Task), or you can make them via script or trigger:

https://community.bistudio.com/wiki/Tasks

If you use the module I believe you can just sync the module to the trigger and it will create the task defined in the module once the trigger is tripped.
« Last Edit: April 13, 2015, 09:43:41 AM by SGT Atkinson »
N. ATKINSON
SSG, USA
Retired


M. Spears

  • Posts: 13
Re: Arma 3 Mission editing
« Reply #2 on: April 13, 2015, 04:55:15 PM »
That is incredible, thanks.