Belbo 462 Posted March 26, 2014 Hey guys, I really need your help - at least if you don't want me to spin around myself crazily while reciting ancient chants in foreing languages... I think I'm slowly going insane. But let's start at the beginning: I'm trying to put together a couple of scripts to something like a mission template. So I can create an easy mission in the editor, place my units, create some markers and copy my "template" over to the mission folder without having to think about different loadouts, different scripts etc - and simultaneously offer my players a larger amount of possibilities to change the course of the mission. For that I put a lot of params in my cfgParams that can alter the time of day, the loadouts, the revive-script, tpw-scripts, the respawn-time, the gear saving upon respawn and so on. But for the life of mine, I can't get it to work in multiplayer! I tried everything (at least everything I know of): Calling the scripts from the init.sqf with execVM, calling the scripts from the init.sqf via call BIS_fnc_MP, with isPersistent true, without isPersistent true, calling the scripts from the initPlayerlocal via execVM, via BIS_fnc_MP, tried to make a mixture of both, trying with a initServer.sqf, even weird mixtures of public variables and execVM or compileFinal preprocesswhatIdon'tknowwhatheheck... I'm at my wits end. If I play the mission on my own, everything works fine. Everything is spawned correctly, all settings are called, the loadouts work, the respawn settings, the revive and so on. As soon as I play with someone else their uniforms don't appear (although I made sure that addUniform is executed on each client via BIS_fnc_MP), the other players don't get the revive option, the gearsaving doesn't work for them (only for me), they don't see the briefing, the logistic-scripts don't work - with some exceptions almost no scripts work. Adding to that tedium I'm not competent enough in mission scripting to see my mistakes. If someone could have a look at my mission-template (the dropbox link leads to a sample mission containing the whole template - created on devbuild unfortunately) and help me get rid of those problems, I'd be really thankful! click me -> dropbox-link <-click me Share this post Link to post Share on other sites
Magirot 14 Posted March 26, 2014 As soon as I play with someone else their uniforms don't appear (although I made sure that addUniform is executed on each client via BIS_fnc_MP) I seem to remember from the thread that executing addUniform had problems even with BIS_fnc_MP. Only solution I've found is making sure that removeUniform is not run after the initial initialisations, and executing loadouts through functions. Here's one of my loadout scripts, though I wouldn't rush changing yours yet, since no-one more adept at scripting than me has taken a look at it yet. I can't take a proper look at the mission now, but you should at least get the briefing show up if you just call it from the beginning of init.sqf with [] execVM "briefing.sqf"; and add if (!isDedicated && (player != player)) then { waitUntil {player == player}; waitUntil {time > 10}; }; to the beginning of briefing.sqf. If that file is your only setup for it? In case you use modules, they're quite broken in MP, though the task ones work except for some flicker for Join-In-Progress players. Share this post Link to post Share on other sites
Belbo 462 Posted March 27, 2014 I seem to remember from the thread that executing addUniform had problems even with BIS_fnc_MP. Only solution I've found is making sure that removeUniform is not run after the initial initialisations, and executing loadouts through functions. Here's one of my loadout scripts, though I wouldn't rush changing yours yet, since no-one more adept at scripting than me has taken a look at it yet. I can't take a proper look at the mission now, but you should at least get the briefing show up if you just call it from the beginning of init.sqf with [] execVM "briefing.sqf"; and add if (!isDedicated && (player != player)) then { waitUntil {player == player}; waitUntil {time > 10}; }; to the beginning of briefing.sqf. If that file is your only setup for it? In case you use modules, they're quite broken in MP, though the task ones work except for some flicker for Join-In-Progress players. Thank you for your ideas. I tried to make a version of my loadout scripts that executes all the removals from every playable unit prior to complete player initialisation (from within the initPlayerLocal.sqf). I'm currently wondering if the solution to my problem might probably much easier than I expected: I had an isServer check in my initPlayerLocal.sqf. I suppose I shouldn't have had it in this file, as none of the contents of my initPlayerLocal.sqf could be executed on the clients as long as the isServer value wasn't true for them (which it can't be). Am I right? Share this post Link to post Share on other sites