Jump to content
Sign in to follow this  
EddiePrice

MP Scripting Locality

Recommended Posts

Hi guys,

I've made a mission where you have to take out a Russian officer on Utes. I decided to put in a script where you can pick up intel (via addaction on object) that marks his location on the map. However, the script appears to run locally so only the person who uses the addaction can see the information given.

Here's the script:

sleep 0.5;
deletevehicle intel1;
deletevehicle intel2;
deletevehicle intel3;

sleep 2.5;

Hint "Documents found confirm meeting point. \n \nCheck map.";

_marker = createMarker ["targetmarker", position target];
_marker setMarkerShape "ICON";
"targetmarker" setMarkerType "hd_objective";
"targetmarker" setMarkerColor "ColorBlack";
"targetmarker" setMarkerText "Nikolaevich meeting point";

sleep 2.5;

targetfound = true;
tsklocatetarget setTaskState "SUCCEEDED";
[objNull, ObjNull, tsklocatetarget, "SUCCEEDED"] exec "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

Both the task completion and the hint are local to the person who used the addaction, however the map marker appears for everyone.

I'm wondering if in this case I need to use the ? not isServer : exit or the ? !(local server):exit condition at the start of the script or maybe something to make the script global? As I'm not 100% sure on MP scripting any help would be great!

Thanks! :)

Safety

Edited by SafetyCatch

Share this post


Link to post
Share on other sites

Thanks for that, the globalvariable method seems to work in SP, yet to try it in MP but I'm sure it will fix things.

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  

×