Jump to content

Recommended Posts

here is my question. :confused:

I like to know if it is possible to synchronize the unit that is part of a team to a module during the game, because I'd like the unit that I recruit in the game is synchronized with the First Aid module & other module.:j:

Share this post


Link to post
Share on other sites

i dont know how you are getting the AI recruits.

But when they are created with createUnit add this line into it:

this synchronizeObjectsAdd [name_of_module]

then it should work.

"soldierWB" createUnit [getMarkerPos "marker_1", _groupAlpha,"this synchronizeObjectsAdd [name_of_module]", 0.6, "corporal"]

Share this post


Link to post
Share on other sites
i dont know how you are getting the AI recruits.

But when they are created with createUnit add this line into it:

this synchronizeObjectsAdd [name_of_module]

then it should work.

"soldierWB" createUnit [getMarkerPos "marker_1", _groupAlpha,"this synchronizeObjectsAdd [name_of_module]", 0.6, "corporal"]

Nice, this is the same question I wanna to ask.

Btw, I also wanna to know what you said the "name of module" means to? The CfgVehicle classname or player customed logic name?

Share this post


Link to post
Share on other sites

here line of the script where unit is create :

_unit = group player createUnit [_unittype, [(getPos bon_recruit_barracks select 0) + 20 - random 40,(getPos bon_recruit_barracks select 1) + 20 - random 40,0], [], 0, "FORM"];

can you tell me where i put you line -> "this synchronizeObjectsAdd [name_of_module]"

if you don't know i will just try all possibility ^^

Share this post


Link to post
Share on other sites
Nice, this is the same question I wanna to ask.

Btw, I also wanna to know what you said the "name of module" means to? The CfgVehicle classname or player customed logic name?

the name you put in name box when you place logic in editor.

here line of the script where unit is create :

_unit = group player createUnit [_unittype, [(getPos bon_recruit_barracks select 0) + 20 - random 40,(getPos bon_recruit_barracks select 1) + 20 - random 40,0], [], 0, "FORM"];

can you tell me where i put you line -> "this synchronizeObjectsAdd [name_of_module]"

if you don't know i will just try all possibility ^^

i think this will work:

_unit = _unittype createUnit [[(getPos bon_recruit_barracks select 0) + 20 - random 40,(getPos bon_recruit_barracks select 1) + 20 - random 40,0], (group player),"this synchronizeObjectsAdd [name_of_module]", 0.6, "PRIVATE"];

replace your line with this one, and remember to replace name_of_module with the name in name box in module placed in editor.

Edit: as you can see the line is different now, also no "FORM" in line since this is not exactly the same command, (it is the same, but in a different way) i believe though that it will make no difference, maybe you need to call unit back to formation once its created but thats about it in difference.

If it works, i really cant say, but this method of synchronisation worked with my spawned virtual artillery objects, i think it will work same for AI and first aid module.

Only one way to find out ;)

Edited by Demonized

Share this post


Link to post
Share on other sites

Nice !

Thank You ! it's work perfect ^^

last question if i want to sync it to multiple module i simply do :

(way 1)

_unit = _unittype createUnit [[(getPos bon_recruit_barracks select 0) + 20 - random 40,(getPos bon_recruit_barracks select 1) + 20 - random 40,0], (group player),"this synchronizeObjectsAdd [mod1];this synchronizeObjectsAdd [mod2];this synchronizeObjectsAdd [mod3];", 0.6, "PRIVATE"];

or (way 2)

_unit = _unittype createUnit [[(getPos bon_recruit_barracks select 0) + 20 - random 40,(getPos bon_recruit_barracks select 1) + 20 - random 40,0], (group player),"this synchronizeObjectsAdd ["mod1","mod2,"mod3"]", 0.6, "PRIVATE"];

? :o

(Thanks to have responding so quickly to my thread !)

Share this post


Link to post
Share on other sites

Np, happy it worked :)

change:

this synchronizeObjectsAdd ["mod1","mod2,"mod3"]

to:

{this synchronizeObjectsAdd [_x]} foreach [mod1,mod2,mod3]

PS: (way 1) will also work.

Edit: remove the "" around mod1..2..3 will cause error.

(way 1) is still correct.

Edited by Demonized

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  

×