Jump to content
RS30002

Synchronizeobjectsadd question

Recommended Posts

Hey all, need some help with this

 

trgtfshmngrp1 = createGroup civilian;

"vn_c_men_12" createUnit [[0,0,0],trgtfshmngrp1,"trgtfshmn1 = this; this removeItem 'vn_c_pack_01_engineer_pl'",0.6,"corporal"]; 
sleep 0.5;
trgtfshboat1 = "pook_Trawler_CIV" createVehicle [100,100,0];
trgtfshboat1 setDir 150;
{_x moveInAny trgtfshboat1} forEach units trgtfshmngrp1;
trgtfshboat1 setPos getpos richtaskhelper;
trgtfshmn1 synchronizeObjectsAdd [richtaskdest];
sleep 2;
dummy = [trgtfshboat1, "ColorOrange",true,700] execVM "JBOY\JBOY_boatRandomPatrol.sqf";

[trgtfshboat1, "<t color='#ED102E'>Rig to Blow</t>", "\a3\ui_f\data\igui\cfg\actions\settimer_ca.paa", "\a3\ui_f\data\igui\cfg\actions\settimer_ca.paa", "_this distance player < 17 && 'DemoCharge_Remote_Mag' in magazines player", "_caller distance player < 17", {}, {}, {player removeItem 'DemoCharge_Remote_Mag'; trgtfshboat1 setdamage 0.01; hint "10 seconds to blow."; sleep 10; "Bo_GBU12_LGB_MI10" createVehicle (getpos trgtfshboat1); trgtfshboat1 setdamage 1;}, {}, [], 10, 5, true, false] call BIS_fnc_holdActionAdd;

It doesn't want to sync-add either the boat or the boat driver to the set task destination module, which is placed in editor and synced to the relevant task modules. "richtaskdest" is the name of the location module to be synced.

 

Was hoping i could solve the mobile task destination problem with this, up until now i've relied on helper objects that get hidden for objective locations which are far away and/or are not stationary - like just to give a rough assessment of where the target area is. 

 

Ty in advance for any suggestions

Share this post


Link to post
Share on other sites
3 hours ago, RS30002 said:

trgtfshmn1 synchronizeObjectsAdd [richtaskdest];

 

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

Quote

Syntax:  unit synchronizeObjectsAdd objects

Admittedly, this description is not completely clear - "unit" in this case refers to the thing you are synchronizing to, "objects" refers to an array of objects to be synchronized to that thing.

richtaskdest synchronizeObjectsAdd [trgtfshmn1];

 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Harzach said:

 

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

Admittedly, this description is not completely clear - "unit" in this case refers to the thing you are synchronizing to, "objects" refers to an array of objects to be synchronized to that thing.


richtaskdest synchronizeObjectsAdd [trgtfshmn1];

 

 

 

Didn't work.

 

Got around it tho, synced the module with the invisible helper sphere in editor and then in the script attached the sphere to the boat and now it's moving like it's supposed to.

  • Like 1

Share this post


Link to post
Share on other sites

Yeah, it looks like most modules are synced only at mission init, so you can't sync new objects during mission runtime. The "dummy' method is probably the way to go.

Share this post


Link to post
Share on other sites

BIS_fnc_taskSetDestination

Just set the destination using the framework functions rather than trying to update a destination module.

  • Like 2

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

×