Jump to content
Sign in to follow this  
{USI}_Zombie

synchronizeObjectsAdd help

Recommended Posts

All the comrefs and biki mention this command but there are no examples, so, here is what I have tried and it doesn't seem to work. I am trying to link a dynamically created mortar tube with the arty logic.

;;mortarcall.sqs

_tube = "M252" createVehicle (position player);

_tube synchronizeObjectsAdd ["mortarlogic"];

hint "synchronized";

{_tube removeMagazine _x} forEach magazines _tube;

_tube addmagazine "ARTY_8Rnd_81mmHE_M252";

exit

the line I have been manipulating is

_tube synchronizeObjectsAdd ["mortarlogic"];

. The arty module is named mortarlogic. I have tried:

_tube synchronizeObjectsAdd ["mortarlogic"];

and

_tube synchronizeObjectsAdd [mortarlogic];

and

_tube synchronizeObjectsAdd mortarlogic;

Ideas? If anyone knows how to update the biki for this command, once we figure out how to use it..........

Share this post


Link to post
Share on other sites

Tried doing it the other way around?

mortarlogic synchronizeObjectsAdd [_tube];

Share this post


Link to post
Share on other sites
Tried doing it the other way around?

mortarlogic synchronizeObjectsAdd [_tube];

That works. Well, at least it adds it to the sync list, but it still doesn't actually sync it? Didn't get the target action to show up, not even running synchronize after the addition. :(

Share this post


Link to post
Share on other sites

Well I dunno how it work on the whole, but if that works at least the command is proper... Maybe we need a BIS dude to fill in if its even supposed to work to synchronize objects after mission start. I'm not so sure it does.

Share this post


Link to post
Share on other sites

thats what keep happening to me, or not happening, no arty target action...sigh. For now I will change my syntax to the other way around though. Thanks

Share this post


Link to post
Share on other sites

You can't synchronize artillery properly once the map has started. So add this:

[_tube] call BIS_ARTY_F_initVehicle;

Share this post


Link to post
Share on other sites
You can't synchronize artillery properly once the map has started. So add this:

[_tube] call BIS_ARTY_F_initVehicle;

Thanks, will give it a try...another undocumented function, the biki doesn't mention BIS_ARTY_F_initvehicle at all

edit:

that was the ticket MH6 thanks a million!

Edited by {USI}_Zombie

Share this post


Link to post
Share on other sites

I guess if I'd type in a better search I could find stuff like this, but Ive tried the

[_tube] call BIS_ARTY_F_initVehicle;
code but its not working. This is my original post in another thread:
Ive got a mission using EBS and Dac. Now I have the foward observer module sync to 3 mortar pieces and also an AI on map, but I was wanting to figure out how to sync it to units that get spawned or respawned. I was wanting to use a trigger with a faction present and in the init of the trigger Ive tried these:
Art synchronizeObjectsAdd [this select 0];

Art synchronizeObjectsAdd [this];

this synchronizeObjectsAdd [Art];

I was just wondering if anyone knew something I dont. WHICH is very possible I am a bit limited on scripting. lol

Thanks for your response or views,

Mikey74

PS its using the mod I44 and its foward observer module.

Share this post


Link to post
Share on other sites

Almost all of the BIS modules that uses synchronization, discovers what it is synced to at the start of the script and then never really checks again.

Share this post


Link to post
Share on other sites

ahh So I basically need to spawn it and find out what the class name for the I44 foward observer classname is to get it to kind of work. Kind of what I figured. Thanks :-)

Here is what I've got:

sleep 3;

_unit = this select 0;

_art1 = this select 1;

_art2 = this select 2;

_art3 = this select 3;

sleep 2;

sleep 2;

_LogicCenter = createCenter sideLogic;

_groupLogic = createGroup _LogicCenter;

art = _groupLogic createUnit ["I44_Module_ForwardObservers", [0, 0, 0], [], 0, ""];

art synchronizeObjectsAdd [_unit,art1,art2,art3];

sleep 2;

exit;

Ive got a trigger with opfor present and in the init it has

null = [this,art1,art2,art3] execVM "artillery.sqf";
It sync's to artillery, but not the spawned AI. :-( Edited by Mikey74

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  

×