Stagler 39 Posted August 7, 2012 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
cuel 25 Posted August 7, 2012 add if (!isServer) exitWith{}; at the top of your spawn script. Share this post Link to post Share on other sites
Horner 13 Posted August 7, 2012 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
Stagler 39 Posted August 12, 2012 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
riouken 15 Posted August 12, 2012 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
Byington 1 Posted October 12, 2012 (edited) 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 October 12, 2012 by Byington Share this post Link to post Share on other sites