Jump to content
Sign in to follow this  
clydefrog

Very strange problem on self hosted dedicated server

Recommended Posts

I just had something weird happen and I was wondering if anybody here could explain why this could happen.

I was running a script on an object to blow it up:

sleep 1;


// timer

while {true} do {

		hintsilent format ["Time Until Detonation :%1", [((_timeleft)/60)+.01,"HH:MM"] call bis_fnc_timetostring];


	if (_timeleft < 1) exitWith{};


 	_timeleft = _timeleft -1;

sleep 1;

};



// create bomb and destroy object

"R_80mm_HE" createvehicle getpos _object;
{_x setdamage 1} foreach crew _object + [_object]; 

sleep 2;

// set global variable for the object being destroyed

destroyed = true;
publicVariable "destroyed";

sleep 5;

// global hint to let all players know what has happened

_sideHint ="<t color='#58FA58' size='1.2' shadow='1' shadowColor='#000000' align='center'>The power has been cut to the Marina.</t><br/><br/><t color='#58FA58' size='1.2' shadow='1' shadowColor='#000000' align='center'>All lights in the area are now out.</t>";
   _GlobalHint = _sideHint;
           GlobalHint = _GlobalHint;
           publicVariable "GlobalHint";
           hint parseText GlobalHint;

Now, in the editor I have a trigger that checks for the "destroyed" variable in its condition (condition: destroyed), and in the onAct it runs a script to damage the lights in an area (onAct: 0 = [0.95] execVM "lights.sqf";):


// off: 0 = [0.95] execVM "lights.sqf";
// on: 0 = [0] execVM "lights.sqf";

_types = ["Lamps_Base_F", "PowerLines_base_F"];
_onoff = _this select 0;

for [{_i=0},{_i < (count _types)},{_i=_i+1}] do
{
   // powercoverage is a marker I placed.
_lamps = getMarkerPos "powerCoverage" nearObjects [_types select _i, 500];
sleep 1;
{_x setDamage _onoff} forEach _lamps;
};

What happened was, when I was hosting the dedicated server and my friend ran the action, only he saw the lights go off and got the message about it happening, but I didn't. When I ran the action we both saw the lights go off and got the message.

Then we tried it on the dedicated server he was hosting, on that server when either of us ran the action we both saw the lights go out and got the message so it worked properly, some other things also worked that didn't work properly when I was hosting.

This doesn't make any sense to me at all how this can happen, does anybody here have an explanation for that type of strange behaviour? :confused_o:

Share this post


Link to post
Share on other sites

That's quite a lot of views without a reply, I guess nobody else here can understand why this happened either?

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  

×