Jump to content
_SCAR

Module Framework: list of synced units?

Recommended Posts

All,

I am trying to use the Module Framework but I can't understand how to:

 

  • Add other entities beside UNITS to the list of synced entities (for example, if I sync a LocationArea_F)
  • Limit the classes that can sync with a module.

 

Any kind soul has pointers?

 

Thank you,

_SCAR

Share this post


Link to post
Share on other sites

Have you tried adding the class names of the objects into this?

 

sync[] = {"LocationArea_F"}; // Array of synced entities (can contain base classes)

Share this post


Link to post
Share on other sites

Yes, but that part is only to add description to the module (as the name suggests).

 

I guess the only way is to use one of the following?

 

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

 

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

 

It just sounds strange that the Module Framework only returns units, and the other elements need to be retrieved using other ways...

Share this post


Link to post
Share on other sites

AFAIK,

Yep pretty much.

I also like to add and remove synced objects, however this isnt possible with modules. So I have the module create a game logic, and transfer all synced objects to that, allowing things to be edited mid mission.

  • Like 1

Share this post


Link to post
Share on other sites
On 9/21/2017 at 10:04 AM, MKD3-FHI said:

I also like to add and remove synced objects, however this isnt possible with modules.

I don't understand this statement. Modules are nothing more than a game logic with some special settings, you can add/remove synced stuff to them during a mission. The only time you do not notice the changes is if the module is only scripted to take into account synced objects at mission start(most BI modules). If your writing your own module then you just need to take this into consideration and every so often re-evaluate synced objects or create your own function to both synchronise to the logic and pass it to the the logics script(what ever this maybe e.g say a vehicle respawn module you create a function that syncs vehicle then adds to modules list of vehicles to look after/re-evaluates synced objects).

Share this post


Link to post
Share on other sites

Also something to keep in mind about synchronization using synchronization lines: in multiplayer, only the server get synchronized to stuff. Furthermore, it only get sync'ed to stuff present at the beginning. For example: modules synchronized to objects that is not present in the beginning, for example players who join-in-progress, will not be sync'ed, even after they join, and including on the server. But if the object were properly synchronized, they keep being it after respawn - at least for players. If you need to sync on stuff not available in the beginning of the mission, you will need to reevaluate and somehow discover and manually add the synchronization like Larrow mentions.

Share this post


Link to post
Share on other sites
On 9/23/2017 at 1:06 AM, Larrow said:

If your writing your own module then you just need to take this into consideration and every so often re-evaluate synced objects or create your own function to both synchronise to the logic 


In my reading and testing, there isn't a way to add a synchronised object to a module.

synchronizeObjectsAdd - Doesnt work in my testing along with the BIS function that I cant remember.

But if you find a way around it do let me know :)

Share this post


Link to post
Share on other sites
2 hours ago, MKD3-FHI said:

In my reading and testing, there isn't a way to add a synchronised object to a module.

synchronizeObjectsAdd - Doesnt work in my testing along with the BIS function that I cant remember.

Still works fine. Just tried it:

   synchronizedObjects logic    ==> []

Run

   logic synchronizeObjectsAdd [dude];

Then

  synchronizedObjects logic   ==> [dude]

 

 

Share this post


Link to post
Share on other sites
On 9/25/2017 at 0:31 AM, Muzzleflash said:

Still works fine. Just tried it:

   synchronizedObjects logic    ==> []

Run

   logic synchronizeObjectsAdd [dude];

Then

  synchronizedObjects logic   ==> [dude]

 

 

Well, proven wrong. Tried it myself. Must've been doing it at 2am.

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

×