OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: RangerX3X on 10 Jan 2010, 23:48:08

Title: How to script this?
Post by: RangerX3X on 10 Jan 2010, 23:48:08
I have several triggers that are not synched to a waypoint but are in the editor to check for a condition and then result in a few things:

Condition:

WEST CountSide Units WSQDA <1

Result:

HQ sideChat "HQ to all units: Alpha Squad in Sector One has been eliminated"; "WSQDA" setMarkerColor "ColorRed"

Is it possible to script this in an .sqs file and call it from some units initialization field at the beginning of a mission, or by the init.sqf?

Would one of you gents please post me a code snippet and/or explanation of how to make this happen?

OK, I got this to work with the following script:

Code: [Select]
; HELP: Run this script from the ON ACTIVATION field of the trigger.
; CODE: [this] exec "WSQDA.sqs"
; ****************************************************************

; WSQDA Dead

HQ sideChat "HQ to all units: Alpha Squad in Sector One has been eliminated"; "WSQDA" setMarkerColor "ColorRed";

exit

But I am still calling the condition WEST CountSide Units WSQDA <1 from a switch trigger in the mission editor  >:(

Oh, and my bad, this is for Arma 2 - Please move my post there :good: