Jump to content
John Midnight

Adding modules to spawned unit with "createUnit"

Recommended Posts

Hello, I'm creating a singleplayer mission, in wich I use "createUnit" for team switch when I die. But I don't know how to synchronize modules to the created unit, in particular the High Command one. I know there is the command "synchronizeObjectsAdd", but it doesn't seems to work. I created a radio trigger with 

player synchronizeObjectsAdd ["AmbientCombatManager"];

but doens't seems to work. Also, I don't know the classnames of the rest of modules.

 

Thanks in advance.

  • Like 1

Share this post


Link to post
Share on other sites

So if I understand correctly, you used createUnit to create a new unit:

_newunit = "your_unit_type" createUnit [pos, group];

then 

addSwitchableUnit _newunit ;

 

what you need to do now is to give a variable name to your module (mod1 for example) and:

mod1 synchronizeObjectsAdd [player];

or

mod1 synchronizeObjectsAdd ["_newunit"];

Share this post


Link to post
Share on other sites

I don't understand, you don't need to find the module classname, you simply place a module in the editor by hand, then you put something in the "name" section of that module (let's say you put "mod1") and in your trigger activation you write:

mod1 synchronizeObjectsAdd [player];

if you want to find the classname of a unit you want to spawn, put  "call BIS_fnc_configviewer" in the init of some playable unit or in another radio trigger and you should be able to see all the classnames in the game

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

×