Jump to content
Sign in to follow this  
Stagler

Dynamic Object Compositions in MP

Recommended Posts

Im having trouble spawning dynamic object compositions in MP.

It spawns one per client. How do I stop this from happenening? The spawn is triggered by a game logic with the object composition spawn script in its init.

Share this post


Link to post
Share on other sites

add

if (!isServer) exitWith{};

at the top of your spawn script.

Share this post


Link to post
Share on other sites

It could be how your script is set up, would you mind to copy/pasta your code?

Share this post


Link to post
Share on other sites

im just using a game logic with this in the init:

_newComp = [(getPos this), (getDir this), ""CityBase04""] call (compile (preprocessFileLineNumbers ""ca\modules\dyno\data\scripts\objectMapper.sqf""));

any recommendations?

Share this post


Link to post
Share on other sites
im just using a game logic with this in the init:

any recommendations?

Replace it with this:

if (isServer) then { _newComp = [(getPos this), (getDir this), ""CityBase04""] call (compile (preprocessFileLineNumbers ""ca\modules\dyno\data\scripts\objectMapper.sqf"") );};

---------- Post added at 06:47 AM ---------- Previous post was at 06:45 AM ----------

The reason it is spawning one for each client, is becasue every client when they load the mission.sqm runs the init in that game logic. So what we need to do is limit it to run on the server only. The clients will still evaluate the init. but only the server will run the code.

Share this post


Link to post
Share on other sites
add

if (!isServer) exitWith{};

at the top of your spawn script.

Thanks! This worked perfectly I was trying to set up Dynamic object compositions via game logic for a target range I'm working on. I kept getting multiple popup targets on the wreck_target(s)! I googled multiple times! I found nothing to fix the issue, so I broke down and registered. Low and behold it was one of the first posts I found! xD google must not have full access to the forums.

Sadly though, I must say that now the targets have ceased to pop back up... any solutions?

if (!isServer) exitWith{};_newComp = [(getPos this), (getDir this), "FiringRange_Wreck2"] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf"));

Edited by Byington

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  

×