Jump to content
Sign in to follow this  
groo1981

Simple Assassination Mission

Recommended Posts

Hi,

I need help with the script bellow. It's an assassination mission and I think the problem is in the Trigger but I can't figure out how to solve it.

// Side mission for kill an Enemy Officer

// Parameter 1 - Position Array

// Parameter 2 - Marker Name

// Parameter 3 - Side 0-East 1-West

// By Groo

_posArray = _this select 0;

_mkrName = _this select 1;

_newSpawnpos = getmarkerpos _mkrName;

_sideAdjustTarget = switch (_this select 2) do {

case 0: {east};

case 1: {west};

case 3: {GUE};

default 0;

};

_sideAdjustTask = switch (_this select 2) do {

case 0: {east};

case 1: {west};

case 3: {GUE};

default 0;

};

//SetOfficerUnit = {

// OfficerUnit = _this Select 0;

//};

private ["_newGroup","_triggerKill"];

// Create the target

_newGroup = createGroup east;

Officer = "B_officer_F" createUnit [_newSpawnpos, _newGroup,"Removeallweapons this;this disableai ""MOVE""", 0.9, "COLONEL"];

sleep 1;

// Create Mission Task

[west,

["taskKillOfficer", "Kill the enemy Officer",

"Kill the Officer", "",markerpos "mkrKillOfficer"]

] call FHQ_TT_addTasks;

//waituntil {!alive OfficerUnit};

_triggerKill = createTrigger ["EmptyDetector",_newSpawnpos];

_triggerKill setTriggerArea [1,1,0,true];

_triggerKill setTriggerActivation ["NONE","NOT PRESENT",false];

_triggerKill setTriggerStatements ["!alive Officer","",""];

_triggerKill setTriggerType "NONE";

_triggerKill;

sleep 1;

waituntil {triggeractivated _triggerKill};

hint "Mission Suceeded";

["taskKillOfficer","succeeded"] call FHQ_TT_setTaskState;

deleteVehicle _triggerkill;

//deletemarker _mkrName;

The unit spawns but when Killed nothing happens... could someone help me? Thanks in advance.

Share this post


Link to post
Share on other sites

Can you use this in A3

Officer = "B_officer_F" createUnit [_newSpawnpos, _newGroup,"Removeallweapons this;this disableai ""MOVE""", 0.9, "COLONEL"];

I thought it was like this in A2

"B_officer_F" createUnit [_newSpawnpos, _newGroup,"Officer=this;Removeallweapons this;this disableai ""MOVE""", 0.9, "COLONEL"];

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×