Jump to content
Sign in to follow this  
Smoot178

Restarting A Module

Recommended Posts

This is really annoying me. If there is a module on a player (in my case the construction module) and that player dies and respawns the module doesn't work on them anymore.

What can i do to fix this?

Share this post


Link to post
Share on other sites

need to resynchronise the new player vehicle with the module - check the comref, and look for sync - I forget the full command name, but it's what you need.

Share this post


Link to post
Share on other sites

Comref?

Edit: Oh, I see. Is it possible to check if a certain player respawns and resynchronize?

---------- Post added at 01:29 AM ---------- Previous post was at 12:49 AM ----------

Alright so so far I have the construction module name "construct1" and the player named "engie1". What would I need to do to make those synch up every time engie 1 respawns?

Edited by Smoot178

Share this post


Link to post
Share on other sites

I'm experiencing this exact problem, has anyone found a solution yet?

Share this post


Link to post
Share on other sites

I have tried multiple variations of the Synchronizeobjectsadd command to re-enable a module for a respawned player, and it does not work AT ALL.

Share this post


Link to post
Share on other sites

try this instead:

name_module synchronizeObjectsAdd [name_unit1,name_unit2,etc];

I use it in for a UAV mod.. works great.

Share this post


Link to post
Share on other sites
try this instead:

name_module synchronizeObjectsAdd [name_unit1,name_unit2,etc];

I use it in for a UAV mod.. works great.

Do you resynch all the units or just the one that respawned?

Like, if I did a name_module synchronizeObjectsAdd [bob];

Would only Bob be able to use it now and the others lose it, or would Bob be added to the 'allowed' list?

Share this post


Link to post
Share on other sites

it's adding, so anyone that are already added will stay (untill they are killed)

Like for my UAV script, everytime I launch the a new UAV (because it was killed) I run:

BIS_UAV synchronizeObjectsAdd [xvec2, xvec1, MyUAV]

BIS_UAV is the name of UAV mod in the editor.

xvec2, xvec1 are mobile spawn points (domination map)

MyUAV is the name of the UAV I just spawned

I don't have to add individual units to the added list because in the init of the UAV modual I have:

this setvariable ["rules",[west]]

This allows all west players to access UAV..

in the init of the player, you could add this

construct1 synchronizeObjectsAdd [engie1];

Then every time the player respawns, it should be re-synced to the modual.

Share this post


Link to post
Share on other sites

Ahh, perfect! Thanks for the clarification, that was bugging me yesterday.

Share this post


Link to post
Share on other sites

this doesnt work for the constuction module or the battlefield clearence, if anyone has this working can they show me how they did it.

Share this post


Link to post
Share on other sites

As it is written in the ComRef of the synchronize thing, this ingame synchronization must be done due to the very first 0.5 seconds. After that all the synchronization is set in stone.

Had the same problem with the Coin module for my first hunt waldo mission until gave up and implemented a build menu by hand.

I don't know what's the sense of this synchronizeObjectsAdd command when synchronizing with modules can take place only in the first second of the game.

They changed that with the first aid module in 1.04, since the module is resynchronized with the player after respawn, and it seems Big_Daddy made a nice workaround for the UAV module (btw nice work). But for the Coin I think there is still some hax0ring requiered.

Share this post


Link to post
Share on other sites

Seems like it's been a while since this thread was alive but I have a problem fitting this one :)

I've created a mission for a massive MP tournament.

I've put 4 mortars and arty module. Mortars and all playable slots that are allowed to use those mortars as arty are synchronized with the module. So I have :

- one manual arty module

- four empty mortars

- some 30 playable and respawnable infantry slots (crewmen and pilots are not synchronized)

Now when I start the server people can go and use mortars with Arma2's arty aiming. When those men die and respawn they're still able to use mortars again (if it has ammo ofcourse). The problem is when mortar gets destroyed and respawns. The option to aim as arty with it is no more availiable. This is something I can't handle myself so I please for help

The another thing I've noticed is that even those slots not linked/synchronized with Artillery module (like eg. pilots) are also able to use mortars with artillery aiming.

Hope someone from our community can help me with this. Thanks in advance.

Share this post


Link to post
Share on other sites
Seems like it's been a while since this thread was alive but I have a problem fitting this one :)

I've created a mission for a massive MP tournament.

I've put 4 mortars and arty module. Mortars and all playable slots that are allowed to use those mortars as arty are synchronized with the module. So I have :

- one manual arty module

- four empty mortars

- some 30 playable and respawnable infantry slots (crewmen and pilots are not synchronized)

Now when I start the server people can go and use mortars with Arma2's arty aiming. When those men die and respawn they're still able to use mortars again (if it has ammo ofcourse). The problem is when mortar gets destroyed and respawns. The option to aim as arty with it is no more availiable. This is something I can't handle myself so I please for help

The another thing I've noticed is that even those slots not linked/synchronized with Artillery module (like eg. pilots) are also able to use mortars with artillery aiming.

Hope someone from our community can help me with this. Thanks in advance.

i haven't tried it out myself but once the artillery pieces respawn and you've resynched them with your script you'll have to reinitialize the init script of the module which is:

 
_script = _this execVM "\ca\modules\arty\data\scripts\init.sqf";

or

_script = NAME-OF-LOGIC execVM "\ca\modules\arty\data\scripts\init.sqf";

if that doesn't work then i have no idea why it won't let you use the artillery without doing much research of the artillery scripts.

Share this post


Link to post
Share on other sites

Thanks for your reply. I'm completly green with scripts so I don't exactly know what you wrote :))

All the scripts I use in the mission are written by someone else as a template for our MP missions. I can't reach the guy that's why I posted my problem here.

We have an Init script in the mission folder but... I'm not sure what it does in details.

It has stuff like that :

onPlayerConnected " [_id,_name,_uid] execVM ""SERVER\Server_JoinInProgress.sqf"" ";

onPlayerDisconnected " [_id,_name,_uid] execVM ""SERVER\Server_LeftInProgress.sqf"" ";

enableSaving = false;

VARS=false;

CONST=false;

CONFIG=false;

//execute grass..

setTerrainGrid (paramsArray select 2);

//..and view distance options

setViewDistance (paramsArray select 1);

// INITIALIZE VARIABLES

if (isServer) then

{

[] execVM "VARS.sqf";

waitUntil {VARS};

};

// AWAITING VARIABLE PLAYER

if (not (isServer)) then

{

waitUntil {not (isNull player)};

};

// INITIALIZING COMMONS

if (isServer || (local player)) then

{

[] execVM "CONST.sqf";

waitUntil {CONST};

};

// INITIALIZING CONFIG FILE

if (isServer || (local player)) then

{

[] execVM "CONFIG.sqf";

waitUntil {CONFIG};

[] execVM "COMMON\Common_Init.sqf";

};

// INITIALIZING SERVER_INIT.sqf

if (isServer) then

{

[] execVM "SERVER\Server_Init.sqf";

};

// INITIALIZING CLIENT_INIT.sqf

if (local player) then

{

[] execVM "CLIENT\Client_Briefing.sqf";

[] execVM "CLIENT\Client_Init.sqf";

};

true;

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  

×