-
Content Count
4 -
Joined
-
Last visited
-
Medals
Community Reputation
1 NeutralAbout Deleted
-
Rank
Rookie
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Script in "initServer.sqf" Doesn't Execute in Dedicated Multiplayer Server
Deleted replied to Deleted's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I followed your instructions and it works well! Thank you very much for your help sir, as well as your explanations! -
Script in "initServer.sqf" Doesn't Execute in Dedicated Multiplayer Server
Deleted replied to Deleted's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I see. That makes sense, thank you very much. I suppose I should revisit the BI Wiki to evaluate which commands are local and which are global. So from what I understand from your comments, should I place something like this in the helicopter's init box? if (!isServer) exitWith {}; [[HelicopterVarName, true], "Scripts\H60Setup.sqf"] remoteExec ["execVM", 0]; -
Script in "initServer.sqf" Doesn't Execute in Dedicated Multiplayer Server
Deleted replied to Deleted's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I apologize for my explanation, as it does leave a ton of questions from the start. For the past few times that I've tried it, I've set it up in two ways to test two approaches at once. 1.) In the helicopter's init box I typed in: if (!isServer) exitWith {}; [this, true] execVM "Scripts\H60Setup.sqf"; 2.) Additionally, I assigned a global variable to the helicopter in the 3DEN editor and called it "testHelicopter", and then execVM-ed the script through the "initServer.sqf" like this: [testHelicopter, true] execVM "Scripts\H60Setup.sqf"; -
Good Afternoon All, I've run into an issue where a script that I've created where the script itself doesn't execute even though it's scripted to in the "initServer.sqf". The script itself works fine and I've tested it extensively in Singleplayer and in my own LAN server, but when I load it up onto my dedicated server it doesn't run unless I specifically call it after the start of the mission. This script should be executed on the server only and works by calculating the change in damage to the main rotor, evaluates if that change is lower than a specific threshold (here 0.02 to be exact), and if it is lower it will then subtract that damage. This effectively cancels out the "background damage" that's caused by over-torquing the main rotor on the H-60 while still allowing outside damage, like small arms fire, to be applied. So far, I have tried placing the whole script in the "initServer.sqf" file, creating a separate .SQF file for the script and execVM-ing it through both an "init" box and "initServer.sqf", creating a function in the "initServer.sqf" and calling it, and a myriad of other things including delaying the script's execution until after mission start and so forth. None of my attempts have worked. I would appreciate any and all input on this matter. Thanks guys. Here is the script itself: params ["_helicopter", "_Debug_Messages"]; //////////////////////////////////ADDING OVERTORQUE REMOVER if (_Debug_Messages == true) then { hint parseText format ["<t font = 'PuristaBold'>MythScript</t> is now active.<br></br><br></br>Attached to: %1", typeOf _helicopter]; }; sleep 5; _lastDamage = 0.02; _change = 0; while {alive _helicopter} do { if (_Debug_Messages == true) then { hintSilent parseText format ["Change: %3<br></br><br></br>Current Rotor Damage (raw): %1<br></br><br></br>Current Rotor Damage (corrected): %2", _lastDamage, (round (_lastDamage * 100)), _change]; }; _change = (_helicopter getHitPointDamage "hithrotor") - _lastDamage; if (_change < 0.02 && _change > 0) then { _helicopter setHitPointDamage ["hithrotor", ((_helicopter getHitPointDamage "hithrotor") - _change)]; }; _lastDamage = (_helicopter getHitPointDamage "hithrotor"); if (_lastDamage == 0.04) then { _helicopter setHitPointDamage ["hithrotor",0]; }; sleep 0.5; }; //////////////////////////////////