Jump to content
Sign in to follow this  
1para{god-father}

Resynchronize Module

Recommended Posts

I don't think it is working on a dedicated....

---------- Post added at 12:28 PM ---------- Previous post was at 12:23 PM ----------

How should i call the script Shuko? Can you give me the line?

---------- Post added at 01:38 PM ---------- Previous post was at 12:28 PM ----------

Shuko:

When i put this on a gamelogic in the map:

null = [] execVM "revivesystem.sqf";

The modules work on dedicated. But if i put that line on init.sqf it does not work. So i'm probably not callig the script from init.sqf as i should.

Edited by CarlosTex

Share this post


Link to post
Share on other sites
I honestly have no idea. I just wrote it, tested quickly on my dedi with 2 clients that jips and respawned units were able to give first aid. When/why does the captive bug appear?

No idea. It seems completely random. Might be related to someone dying while in agony state (script normally sets players in agony state as captive, but the bug might cause it to set the respawned player as captive as well for some reason, on semi-rare occasions). If you play with it for long enough you'll almost surely run into the bug, unless your method somehow ends up avoiding that bug.

Share this post


Link to post
Share on other sites

I can confirm that there are some bugs yeah. Sometimes players try to carry or drag and they become stuck and cannot move. Dunno if this has anything to do with that captive thing

Share this post


Link to post
Share on other sites

Nope, that's an entirely different bug, but quite annoying as well.

Share this post


Link to post
Share on other sites

There is also another thing. I noticed that if i respawn by clicking respawn on the menu the modules won't work often. The modules never behave 100% perfect. Sometimes they work sometimes they do not.

Too bad. I really would love to use this but seems very difficult.

http://dev-heaven.net/issues/11702

Share this post


Link to post
Share on other sites
Yes, they need to be synced at mission start, but not resynced on rsepawn. Resyncing on respawn doesn't seem to do anything at all.

Currently i would just need the Battlefeld Clearence, module. So all i need for that to work is put the module in the editor sync them to units and that's it?

How many modules? One for each unit? One per group? In my mission players from each faction are not linked so 5 players equal five groups.

---------- Post added at 03:36 PM ---------- Previous post was at 03:29 PM ----------

i know myself that for the 3 firstaid modules listed above by shuko works when created mid mission, seemed in my tests on changebody.sqf that you could have as many modules you want of these modules, but it was very important to create the units, create the modules, and imediatly synch them to work.

there was no need to delete the old modules, though not tested in a long time mision, only editor.

no double effects or nothing.

all good.

What do you mean by mid mission? Can you tell me the best way to put the BC module working Demonized?? My faith in individual drag and carry scripts is driving me nuts, i won't be able to do it...

This module questions are confusing for me because there isn't a consensus of how will it work... So i just ask if anybody has a way let me know please, i don't need the module on AI, only in playable Units.

Share this post


Link to post
Share on other sites

mid mission = middle of mission, during mission, after mission start, not directly at start.

the way i did in this order, NOTE: happened in SP editor:

Also note its not correct usage of commands(im lazy now) but that was the order, it worked 10 minutes into a mission, and multiple times.

BUT, when i did it, i created all 3 first aid modules, and then synched them to every new unit/group, not just BC alone.

createVehicle array unit;

createVehicle array module;

module synchroniseadd [unit];

Edit: Shuko has posted all relevant codes, but i used createVehicle array instead of createVehicleLocal in my tests.

Edited by Demonized

Share this post


Link to post
Share on other sites
mid mission = middle of mission, during mission, after mission start, not directly at start.

the way i did in this order, NOTE: happened in SP editor:

Also note its not correct usage of commands(im lazy now) but that was the order, it worked 10 minutes into a mission, and multiple times.

BUT, when i did it, i created all 3 first aid modules, and then synched them to every new unit/group, not just BC alone.

createVehicle array unit;

createVehicle array module;

module synchroniseadd [unit];

Edit: Shuko has posted all relevant codes, but i used createVehicle array instead of createVehicleLocal in my tests.

Ok so to guarantee that the module isn't initialised at start could i do this:

waitUntil {!isNull player};
sleep 60;
exec VM shuko's code;

Plus when you say it worked in SP editor that does not give me any more confidence, it works fine in SP i tested it myself and very easy to do it. But in a dedicated that's another story...

Also using other FA modules for me will ruin cause i developed my own system now, pretty basic but efficient, so all i need is BC module.

I'm startting to lose my hope on this there does not seem to be a right answer for this and people say a lot of different things. That's why i started editing norrins scripts but even those have problems working...

Share this post


Link to post
Share on other sites

I changed Shukos's code just to have the BC module:

SHK_FirstAidModules = [];
SHK_fnc_addFAModules = {
 private "_o";
 {
   _o = _x createvehiclelocal [1,1,1];
   _o synchronizeObjectsAdd playableunits;
   SHK_FirstAidModules set [count SHK_FirstAidModules, _o];
 } foreach ["BattleFieldClearance"];
};
SHK_fnc_remFAModules = {
 {
   deletevehicle _x;
 } foreach SHK_FirstAidModules;
};
SHK_fnc_readdFAModules = {
 call SHK_fnc_remFAModules;
 call SHK_fnc_addFAModules;
};

// Mission start, load modules first time.
call SHK_fnc_addFAModules;

// Readd modules after respawn.
if !isdedicated then {
 waituntil {!isnull player};
 player addeventhandler ["respawn",SHK_fnc_readdFAModules];
};

Now i'm just confused of how should i launch this script. I have tried several ways like:

server execVM "scripts\BCmodule.sqf"

or

null = [] execVM "scripts\BCmodule.sqf"

And just can't make it work on a dedicated server. What is the correct way to launch it?

Please can someone give me the definite answer to this? Because i want to make a decision on either try the module or go with independent scripts (which are being quite a pain as well).

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  

×