Snypr 10 Posted June 19, 2011 Hi All, Im creating a mission which is going well so far But, iv got a Ai unit with officer addaction ["Welcome","patrol.sqf"] ----------------- in the patrol.sqf ----------------- _gen = _this select 0; _caller = _this select 1; _id = _this select 2; //remove the action once it is activated _gen removeAction _id; _gen setVehicleInit format ["this removeAction %1",_id]; processInitCommands; officer = 1; [west,"HQ"] sideChat "Welcolme To FOB Revolver Lads"; sleep 7; [west,"HQ"] sideChat "I Am Cpt.America And I Am The Person In charge Of This FOB"; sleep 7; [west,"HQ"] sideChat "Now All Thats Over Lets Get Alpha Squad Onto Your First Patrol"; sleep 7; [west,"HQ"] sideChat "Your Task Is To Patrol Sangin Town,Report Any Findings, But Be Warned There Are Civillians In Town So Remember The ROE"; sleep 7; tsk1 = player createSimpleTask["Patrol Sangin Town"]; tsk1 setSimpleTaskDescription["Our Officer Wants Alpha Team To Patrol Sangin Town","Patrol Sangin Town","Patrol Sangin Town"]; tsk1 setSimpleTaskDestination (getMarkerPos "tsk1"); player setCurrentTask tsk1; "tsk1" setMarkerType "Warning"; [west,"HQ"] sideChat "Your task Has Been Set, Good Luck Alpha Team"; ----------------------------------------- The Text is only seen on the player that activated it,, I need it to be shown on all players playing?? And i also need the tasks to display for players.. I would be gratefull for any help. Cheers SnYpR Share this post Link to post Share on other sites
celery 8 Posted June 19, 2011 (edited) Put this in your init script: "sidechatpv" addPublicVariableEventHandler {_var=_this select 1;_var select 0 sideChat (_var select 1)}; Do this for each chat command: _chatter=[west,"HQ"]; _chat="Welcome to FOB Revolver, lads"; sidechatpv=[_chatter,_chat]; publicVariable "sidechatpv"; _chatter sideChat _chat; Do this to show the task for everyone: player setVehicleInit "tsk1 = player createSimpleTask['Patrol Sangin Town'];tsk1 setSimpleTaskDescription['Our Officer Wants Alpha Team To Patrol Sangin Town','Patrol Sangin Town','Patrol Sangin Town'];tsk1 setSimpleTaskDestination (getMarkerPos 'tsk1');player setCurrentTask tsk1"; processInitCommands; Edit: forgot ; after setVehicleInit line Edited June 19, 2011 by Celery Share this post Link to post Share on other sites
Snypr 10 Posted June 19, 2011 (edited) thanks will try it now Updated 15:20PM I Put "sidechatpv" addPublicVariableEventHandler {_var=_this select 1;_var select 0 sideChat (_var select 1)}; In my init.sqf (arma2 other profiles/mpmission/mission name) i let my mate select the action, and i didnt get the messages on my screen Edited June 19, 2011 by Snypr Share this post Link to post Share on other sites
2nd ranger 282 Posted June 19, 2011 Try this, uses the Multiplayer Framework: In init.sqf: execVM "\ca\Modules\MP\data\scripts\MPframework.sqf"; (also have Functions Module on the map) Patrol.sqf: waitUntil {!(isNil "BIS_MPF_initDone")}; _gen = _this select 0; _caller = _this select 1; _id = _this select 2; [nil, [color="Blue"]OfficerName[/color], "per", rREMOVEACTION, 0] call RE; officer = 1; publicvariable "Officer"; _nic = [[west,"HQ"], nil , rsideChat, "Welcome To FOB Revolver, Lads"] call RE; sleep 7; _nic = [[west,"HQ"], nil , rsideChat, "I Am Cpt. America And I Am The Person In charge Of This FOB"] call RE; sleep 7; _nic = [[west,"HQ"], nil , rsideChat, "Now All That's Over Lets Get Alpha Squad Onto Your First Patrol"] call RE; sleep 7; _nic = [[west,"HQ"], nil , rsideChat, "Your Task Is To Patrol Sangin Town, Report Any Findings, But Be Warned There Are Civilians In Town So Remember The ROE"] call RE; sleep 7; _AddTask = { tsk1 = player createSimpleTask["Patrol Sangin Town"]; tsk1 setSimpleTaskDescription["Our Officer Wants Alpha Team To Patrol Sangin Town","Patrol Sangin Town","Patrol Sangin Town"]; tsk1 setSimpleTaskDestination (getMarkerPos "tsk1"); player setCurrentTask tsk1; "tsk1" setMarkerType "Warning"; }; {[objNull, _x, rSPAWN, [], _AddTask ] call RE;} forEach [[color="Blue"]Player1, Player2 (and so on)[/color]]; _nic = [[west,"HQ"], nil , rsideChat, "Your task Has Been Set, Good Luck Alpha Team"] call RE; Share this post Link to post Share on other sites