Jump to content

PaxJaromeMalues

Member
  • Content Count

    27
  • Joined

  • Last visited

  • Medals

Everything posted by PaxJaromeMalues

  1. RR CRAM Project THIS PROJECT HAS SOFAR NOT BEEN RELEASED AND IS WORK IN PROGRESS Start Date: 12/2020 Team: Wasserstoff (Main Coder) Pax (Github / PR / Code Kiddo) Contributors: none so far Host Community (DE): Website Discord Pre-Release Versions: v1.0.a.1 4.4.21 - v1.0.a.2 Feature-Requests / Bugreports / other issues: PLEASE LABLE YOUR ISSUE! Credits: Can be found on the project main page. already CBA Team for saving our butts with XEHs 😉 Updates will be posted in this thread
  2. We moved the repo to our communities github organization. This update by BI https://dev.arma3.com/post/spotrep-00105 might get us where we want to be with this whole thing. But we currently only have limited time available to continue work on this. We will keep you guys posted if we get this mess to work somehow.
  3. I feel pretty dumb asking this, but I have to anyways: I took all the necessary things, but: ooga booga no hot light. Placed an invisible helipad obj on top of an oil well on Desert_Battlegrounds with an init of: if (isServer) then { ["big","fire",this] remoteExecCall ["PAX_fnc_attachFireTo"]; ["big","smoke",this] remoteExecCall ["PAX_fnc_attachFireTo"]; }; initPlayerLocal.sqf: PAX_fnc_attachFireTo = compile preprocessFileLineNumbers "fncs\PAX_fnc_attachFireTo.sqf"; fncs/PAX_fnc_attachFireTo.sqf: //"_size": "small", "medium", "big" //"_type": "fire", "smoke" //"_pos": object to set on fire params [ ["_size", "", []], ["_type", "", []], ["_pos", objNull, []] ]; private _fireType= format ["%1Destruction%2", _size, _type]; private _emitter = "#particlesource" createVehicle (getPos _pos); _emitter setParticleClass _fireType; _emitter attachTo [_pos]; I click Play In Singleplayer. No fire can be seen. I click Play in Multiplayer. No fire can be seen. Sad and shivering cavemen noises.
  4. Okay. So here is a small update: We are still stuck with the locality issue in dedicated multiplayer and I would like to throw out a help request to the modding community. I know that there are a ton of very talented people out here and I hope some might be willing to take a look at this. The issue: As far as I was able to compehend the current state is working in singleplayer AOK as all assets are local to the client including the projectile that we very much need to correctly identify to track and ultimatley (hopefully) intercept it. As soon as we move over to the multiplayer environment, we see the following events: a.) The artillery piece fires | radar is on passive standby | all turrets are on passive standby b.) An object enters the radars covering range and is identified as: airborn && decending && shell based | radar goes into active state but the shell is not yet brought into the database | all turrets are on passive standby c.) The tracked object enters the danger range of said active radar | radar shifts the object into the target database and alerts all connected turrets | all connected turrets fetch target data and start active tracking d.) The actively tracked shell enters the engagement range defined | radar sends engagement signal to all tracking turrets | all connected turrets engage target with burst fire e.) The shell is destroyed by munitions hitting the shell object around a small diameter hotbox attached to the shell | radar checks database for next target | turrets change into standby and await next target f.) For some reason the artillery shell does visibly explodes in the air on step e, but client side a projectile still impacts with the ground, leading us to believe that shells are not syncronous among connected server and the clients. If possible use our github for any questions, bugs or anything really. Thanks Pax
  5. PaxJaromeMalues

    3CB Factions

    Variants of BTR60 in the Factions Pack throw errors like this: Picture \rhsafrf\addons\rhs_decals\data\numbers\4_ca.paa not found Which hinder missions using those assets from loading upon mission selection on the server. A ticket was opened at RHS for this but I am pretty sure it does not belong there but rather here because it only happens with UK§CB variants with attribute option of a skin selected?
  6. We are sadly still stuck with a locality issue for multiplayer use. Also due to a bit of increased work load in our community, this has been paused for a bit. We'll continue after summer most likely.
  7. So far 'GermanHydrogen' has made significant changes to the project and is doing a hell of a good job at getting this to working stage. I plan to release 'v1.0-alpha.3' once the server<->client interaction is in a presentable alpha-state.
  8. PaxJaromeMalues

    [Release] C-RAM Script

    Nope. Praetorians in Vanilla sofar shot at Fixed Wing, Rotary Wing and strategic missiles when I placed them in editor. This is what I have worked out so far. There is sofar no functionality for missle interception as that is being done just fine by the vanilla weapon system. If anyone wants to participate, go right ahead. https://github.com/PaxJaromeMalues/arma3_cram
  9. PaxJaromeMalues

    [Release] C-RAM Script

    Thank you Zby, I am currently rewriting the entire script with components from Fluff, Kirumy and Yax's ITC Land Mod. I hope to be able to create a scripted, well working version comparable to the CRAM in ITC, but on a per mission basis. This might take some weeks, I will post it in a new thread with a Link to this one.
  10. PaxJaromeMalues

    [Release] C-RAM Script

    @Floof @kirumy Would be awesome if this could be continued. I will try it out for sure. Its very helpful if you need cram functionality but adding a mod to the modpack is not possible for that reason alone. EDIT: So I tried it out and the script somehow now has several failures popping up but I am too inapt to identify the issues within the code. Sofar I could only see that it got something to do with _interceptor and _ammo? _ammoType?
  11. Reported https://feedback.bistudio.com/T136751
  12. Hello folks, I am currently working on a mission designed for training puposes. The mission is build upon the OlsenFramework, a mission making framework. Links are to either githubs. I am running into the following problem: a) If I test the mission in the Eden Editors host environment and singleplayer, all code executes flawslessly when addEventHandler is used (obviously no MP). b) When tested on a dedicated server, the EventHandlers (addEventHandler and addMPEventhandler) will not fire at all. This was tested via systemChat messages. The code: (All code can be viewed on the github linked, its the latest changes made and the last version tested on the server) A few months back I was given a script by my units training officer to work with popup targets but it was split in a multitude of files and also only worked partially on dedicated, which I did not like so I rewrote it into a single script. The origin of that code is not known to me, so forgive me for the missing credits. In the init.sqf of the mission, I call code which adds a line of code to each targets which apparently is supposed to 'fix' swivel targets not working in multiplayer dedicated environments. This can be found here. As far as I unterstand this is supposed to disable animation control on all clients (including non dedicated servers and HC), but sofar the targets still behave crappy. if (!isDedicated) then { _localTargets = (entities "Target_Swivel_01_ground_F") + (entities "Land_Target_Swivel_01_F"); { _x setVariable ["BIS_exitScript", false]; } forEach _localTargets; }; later I call my script which is mainly in control of the targets: popup.sqf once via the init.sqf to get all targets into a down position at mission start. This works flawless. Fnc_popup is the same as popup.sqf just processed via: Fnc_popup = compile preprocessFileLineNumbers "customization\popups.sqf"; if (isServer) then { [false,"init",500,initCenter] remoteExec ["Fnc_popup", 2]; }; Players being Instructors are makred via a variable "isInstructor" only players with this restriction will have access to the popup addAction ... actions. Which are placed on landBoards in the mission. en example from the addAction.sqf looks like this: Fnc_popup = compile preprocessFileLineNumbers "customization\popups.sqf"; if (!isDedicated) then { waitUntil { (player == player) }; if (player getVariable "isInstructor") then { arBoard addAction ["<t color='#FF0000'>Raise Bunker Targets",{[true,"setup",15,bnkTgts] remoteExec ["Fnc_popup", 2];}]; arBoard addAction ["<t color='#FF0000'>Lower Bunker Targets",{[false,"reset",15,bnkTgts] remoteExec ["Fnc_popup", 2];}]; }; }; This calls a precompiled form of popup.sqf and now the problöem occurs that everything in that popup.sqf works, except for the damn eventHandlers place on the trainingTargets. case init and case reset work, and throw no script errors. This is the popup.sqf file content: /////////////////////////////////////////////////////////////////////////////////////////// //Script to be called by inits or scripts for operating swivel and popup //targets around a specified object "_center". //params: [ShouldTargetsAutoPop?,WhichSwitchShouldRun?,WhatDistanceFromObject?,WhatObject?] //By PaxJaromeMalues /////////////////////////////////////////////////////////////////////////////////////////// params [["_popenabled",false],["_execution","init"],["_dist",25],["_center",initCenter]]; _targets = nearestObjects [position _center, ["TargetBase"], _dist]; _SwivelTargets = nearestObjects [position _center, ["Target_Swivel_01_base_F"], _dist]; switch (_execution) do { case "init": { { _x setVariable ["nopop", true]; _x animateSource ["terc",1] } forEach _targets; { _x setVariable ["BIS_poppingEnabled", false]; _x animateSource ["terc",1]; } forEach _SwivelTargets; }; case "setup": { "setup called" remoteExec ["systemChat"]; if (_popenabled) then { "popup first condition" remoteExec ["systemChat"]; { _x animateSource ["terc",0]; _x addMPEventHandler [ "MPHit", { "popup first condition EH before CBA" remoteExec ["systemChat"]; (_this select 0) animateSource ["terc",1]; [{ (_this select 0) animateSource ["terc",0]; "popup first condition EH in CBA" remoteExec ["systemChat"]; }, _this, 2 + (random 3)] call CBA_fnc_waitAndExecute; } ] } forEach _targets; } else { "popup second condition" remoteExec ["systemChat"]; { _x animateSource ["terc",0]; _x addMPEventHandler [ "MPHit", { (_this select 0) animateSource ["terc",1]; (_this select 0) removeEventHandler ["MPHit",0]; } ] } forEach _targets; }; if (_popenabled) then { "swivel first condition" remoteExec ["systemChat"]; { _x animateSource ["terc",0]; _x addMPEventHandler [ "MPHitPart", { ((_this select 0) select 0) animateSource ["terc",1]; [{ ((_this select 0) select 0) animateSource ["terc",0]; }, _this, 2 + (random 3)] call CBA_fnc_waitAndExecute; } ] } forEach _SwivelTargets; } else { "swivel second condition" remoteExec ["systemChat"]; { _x animateSource ["terc",0]; _x addMPEventHandler [ "MPHitPart", { ((_this select 0) select 0) animateSource ["terc",1]; ((_this select 0) select 0) removeEventHandler ["MPHit",0]; } ] } forEach _SwivelTargets; }; }; case "reset": { "reset called" remoteExec ["systemChat"]; { _x removeEventHandler ["MPHit",0]; _x animateSource ["terc",1]; } forEach _targets; { _x animateSource ["terc",1]; _x RemoveEventHandler ["MPHitPart",0]; } forEach _SwivelTargets; }; }; I have been sitting at this problem for over a month now, and have no idea what I am doing wrong here. Pls help.
  13. And I am back with at least SOME good news: 1. Buddy at my community looked at the code and the config viewer and was able to determine that "terc" as animationSource actually doesn't exist anymore. The term for swivel targets is now: popup_Source. 2. Even tho "Terc" is not working anymore the EH which is on the swivel by default (hitPart) actually works for whatever reason when just placed with the object and entirely left alone. This doesn't get us anywhere tho. 3. We are now able to properly animate the swivels with popup_source in combo with BIS_leaningEnabled. BUT 4. The EventHandler hitPart is still not executing at all. last try in local multiplayer did generate this error in RPT: Code currently looks like this: /////////////////////////////////////////////////////////////////////////////////////////// //Script to be called by inits or scripts for operating swivel and popup //targets around a specified object "_centerObj". //params: [ShouldTargetsAutoPop?,WhichSwitchShouldRun?,WhatDistanceFromObject?,WhatObject?] //By Pax /////////////////////////////////////////////////////////////////////////////////////////// params [ ["_execution", "init"], ["_distance", 500], ["_centerObj", initCenter], ["_popEnabled", false] ]; _targets = nearestObjects [position _centerObj, ["TargetBase", "Target_Swivel_01_base_F"], _distance]; switch (toLower _execution) do { case "init": { { //isKindOf Swivel else isKindOf popup if (typeOf _x isKindOf "Target_Swivel_01_base_F") then { _x setVariable ["BIS_leaningEnabled", false, true]; _x setVariable ["BIS_poppingEnabled", false, true]; _x animateSource ["popup_Source", 1]; } else { _x setVariable ["nopop", true, true]; _x animateSource ["terc", 1]; }; }forEach _targets; }; case "setup": { //Make sure _targets are reset before running the setup phase (layerEightProtection) ["reset", _distance, _centerObj] call Fnc_popup; //Inform Instructor who asked for setup that the command was received "Command received - Targets are being setup" remoteExec ["systemChat", remoteExecutedOwner]; { if (typeOf _x isKindOf "Target_Swivel_01_base_F") then { //Is this target told to auto-pop? _x setVariable ["rePop", _popEnabled]; //Raise the target _x animateSource ["popup_Source", 0]; //Making sure leaning is enabled for the animation _x setVariable ["BIS_leaningEnabled", true, true]; //Add Hit EH and store the EH ID on the target _x setVariable [ "HitEH", _x addEventHandler [ "HitPart", { params [ "_target", "", "", "" ]; //If auto-pop was set if (_target getVariable "rePop") then { _target setVariable [ "rePopThread", _target spawn { "AUTOPOP" remoteExec ["systemChat", remoteExecutedOwner]; sleep (1 + random 4); _this animateSource ["popup_Source", 0]; } ]; //No auto-pop set } else { //Bin Hit EH "NOPOP" remoteExec ["systemChat", remoteExecutedOwner]; ((_this select 0) select 0) RemoveEventHandler ["HitPart",0]; //Clean Shit up _target setVariable ["HitEH", nil]; _target setVariable ["rePop", nil]; }; } ] ]; } else { //Is this target told to auto-pop? _x setVariable ["rePop", _popEnabled]; //Raise the target _x animateSource ["terc", 0]; //Add Hit EH and store the EH ID on the target _x setVariable [ "HitEH", _x addEventHandler [ "Hit", { params [ "_target", "", "", "" ]; //If auto-pop was set if (_target getVariable "rePop") then { _target setVariable [ "rePopThread", _target spawn { sleep (1 + random 4); _this animateSource ["terc", 0]; } ]; //No auto-pop set } else { //Bin Hit EH _target removeEventHandler ["Hit", _thisEventHandler]; //Clean Shit up _target setVariable ["HitEH", nil]; _target setVariable ["rePop", nil]; }; } ] ]; }; } forEach _targets; }; case "reset": { //Inform Instructor of action "Command received - Targets are being reset" remoteExec ["systemChat", remoteExecutedOwner]; { //If the target for whatever reason still has an active EH: if !(isNil {_x getVariable "HitEH"}) then { //if auto-pop is set if (_x getVariable "rePop") then { //Is the target currently waiting to rePop? if (!isNil {_x getVariable "rePopThread"} && {!isNull (_x getVariable "rePopThread")}) then { //If it is waiting, terminate the Thread terminate (_x getVariable "rePopThread"); }; _x setVariable ["rePopThread", nil]; }; if (typeOf _x isKindOf "Target_Swivel_01_base_F") then { _x removeEventHandler ["HitPart", _x getVariable "HitEH"]; _x setVariable ["HitEH", nil]; _x setVariable ["rePop", nil]; _x setVariable ["BIS_leaningEnabled", false, true]; _x animateSource ["popup_Source", 1]; } else { _x removeEventHandler ["Hit", _x getVariable "HitEH"]; _x setVariable ["HitEH", nil]; _x setVariable ["rePop", nil]; _x animateSource ["terc", 1]; }; }; //Lower the targets } forEach _targets; }; }; We still hope someone can point us into the right direction as we are somewhat at the end of our capabilities here. KR Pax
  14. Sofar I could make some progress and actually was able to terminate some possibilities for these issues. 1) Popup targets (the normal ones) now behave as expected inculding the repop delay. (Thanks again @Larrow!) 2) I tried to adapt the code from Larrow for the swivel targets based on the unknown authors mentions of "HitPart" for the EH and the weird bracketing of ((_this select 0) select 0) animateSource yadda yadda 3)The code of @pierremgi actually works when put into each swivels init via the editor. On the server the swivels will not go into weird spasms anymore and actually move back and forth as expected. BUT :P 4) Swivels will still not accept the first call of case init (meaning on mission start they just pop up and swivel along probably also ignoring BIS_poppingEnabled false) AND 5) Will not react to any bullet impact at all (which is unusual) AND 6) Will not execute the EventHandler placed on them (tested with Hit and HitPart as EH designator) This is the modified code sofar: /////////////////////////////////////////////////////////////////////////////////////////// //Script to be called by inits or scripts for operating swivel and popup //targets around a specified object "_centerObj". //params: [ShouldTargetsAutoPop?,WhichSwitchShouldRun?,WhatDistanceFromObject?,WhatObject?] //By Pax /////////////////////////////////////////////////////////////////////////////////////////// params [ ["_execution", "init"], ["_distance", 500], ["_centerObj", initCenter], ["_popEnabled", false] ]; _targets = nearestObjects [position _centerObj, ["TargetBase", "Target_Swivel_01_base_F"], _distance]; // Target_Swivel_01_ground_F ??! Target_Swivel_01_base_F switch (toLower _execution) do { case "init": { { //isKindOf Swivel else isKindOf popup if (typeOf _x isKindOf "Target_Swivel_01_base_F") then { _x setVariable ["BIS_poppingEnabled", false, true]; _x animateSource ["terc", 1]; } else { _x setVariable ["nopop", true, true]; _x animateSource ["terc", 1]; }; }forEach _targets; }; case "setup": { //Make sure _targets are reset before running the setup phase (layerEightProtection) ["reset", _distance, _centerObj] call Fnc_popup; //Inform Instructor who asked for setup that the command was received "Command received - Targets are being setup" remoteExec ["systemChat", remoteExecutedOwner]; { if (typeOf _x isKindOf "Target_Swivel_01_base_F") then { //Is this target told to auto-pop? _x setVariable ["rePop", _popEnabled]; //Raise the target _x animateSource ["terc", 0]; //Add Hit EH and store the EH ID on the target _x setVariable [ "HitEH", _x addEventHandler [ "HitPart", { params [ "_target", "", "", "" ]; //If auto-pop was set if (_target getVariable "rePop") then { _target setVariable [ "rePopThread", _target spawn { sleep (1 + random 4); //_this animateSource ["terc", 0]; ((_this select 0) select 0) animate ["Terc",1]; } ]; //No auto-pop set } else { //Bin Hit EH //_target removeEventHandler ["HitPart", _thisEventHandler]; ((_this select 0) select 0) RemoveEventHandler ["HitPart",0]; //Clean Shit up _target setVariable ["HitEH", nil]; _target setVariable ["rePop", nil]; }; } ] ]; } else { //Is this target told to auto-pop? _x setVariable ["rePop", _popEnabled]; //Raise the target _x animateSource ["terc", 0]; //Add Hit EH and store the EH ID on the target _x setVariable [ "HitEH", _x addEventHandler [ "Hit", { params [ "_target", "", "", "" ]; //If auto-pop was set if (_target getVariable "rePop") then { _target setVariable [ "rePopThread", _target spawn { sleep (1 + random 4); _this animateSource ["terc", 0]; } ]; //No auto-pop set } else { //Bin Hit EH _target removeEventHandler ["Hit", _thisEventHandler]; //Clean Shit up _target setVariable ["HitEH", nil]; _target setVariable ["rePop", nil]; }; } ] ]; }; } forEach _targets; }; case "reset": { //Inform Instructor of action "Command received - Targets are being reset" remoteExec ["systemChat", remoteExecutedOwner]; { //If the target for whatever reason still has an active EH: if !(isNil {_x getVariable "HitEH"}) then { //if auto-pop is set if (_x getVariable "rePop") then { //Is the target currently waiting to rePop? if (!isNil {_x getVariable "rePopThread"} && {!isNull (_x getVariable "rePopThread")}) then { //If it is waiting, terminate the Thread terminate (_x getVariable "rePopThread"); }; _x setVariable ["rePopThread", nil]; }; if (typeOf _x isKindOf "Target_Swivel_01_base_F") then { _x removeEventHandler ["HitPart", _x getVariable "HitEH"]; _x setVariable ["HitEH", nil]; _x setVariable ["rePop", nil]; _x animateSource ["terc", 1]; } else { _x removeEventHandler ["Hit", _x getVariable "HitEH"]; _x setVariable ["HitEH", nil]; _x setVariable ["rePop", nil]; _x animateSource ["terc", 1]; }; }; //Lower the targets } forEach _targets; }; }; Kind regards Pax
  15. Update: since Larrows changes the EH now fire for the regular popup targets and the delay is also working, which is wunderful. This is in Editor multiplayer test AND on a dedicated test server of our community across the globe. Awesome! Swivel targets on the other hand are a mystery to me and are probably borked as fuck when it comes to MP compatibility. In local editor test in multiplayer swivel targets via the current script state start in a swining state... left right, but when shot, will absolutely not react. In state case "setup" they will just continue swinging but due to their different way of being in need of called they now also have no Hit EH (afaik the EH needs to be called HitPart with swivel targets). On the dedicated test server swivels start the same as on local but their "swinging" is reduced to a mere spasm, it will continue to spawms on case "setup" as well. Therefore it can be said that the solution provided on steam to do this here: if (!isDedicated) then { { _x setVariable ["BIS_exitScript", false, true]; } forEach entities [ ["Target_Swivel_01_ground_F", "Land_Target_Swivel_01_F"],[] ]; }; Doesn't do shit to fix the BIS swivels MP issues. Current conclusion until opposed: Dop not even touch swivels targets with a 10 feet pole. Borked AF. As per BIS tracker borked since years and no fix sofar. Thanks everyone for your great help! I will stay with normal popuptargets for now until someone can provide a fix by BIS or per code.
  16. EDIT: Issue found, I did fuck up the eventhandlers {} brackets. Hi @Larrow I read your suggestions line by line and adapted most of it into my script for now. I think there might still be adaptions necessary for the eventHandlers based on if the targets are isKindOf (swivelthingy) as EH for these need to be called and removed differently than normal popup targets if I can trust what others had to do in their scripts in the past. My Init.sqf currently looks like this: #define framework #include "core\script_macros.hpp" #include "core\init.sqf" //DO NOT REMOVE #include "customization\settings.sqf" //DO NOT REMOVE #include "core\dia\debug\dia_debug.sqf" //DO NOT REMOVE #include "customization\addAction.sqf" //give instructors control over all popuptargets //Following code is apparently necessary to make swivels somewhat working in multiplayer if (!isDedicated) then { { _x setVariable ["BIS_exitScript", false, true]; } forEach entities [ ["Target_Swivel_01_ground_F", "Land_Target_Swivel_01_F"],[] ]; }; Fnc_popup = compile preprocessFileLineNumbers "customization\popups.sqf"; if (isServer) then { "hide" execVM "customization\arrows.sqf"; // [false,"init",500,initCenter] remoteExec ["Fnc_popup", 2]; _nul = [] spawn { waitUntil {time > 0}; [] call Fnc_popup; }; "" call FNC_StartingCount; //DO NOT REMOVE [] spawn { //Spawns code running in parallel while {!FW_MissionEnded} do { //Loops while the mission is not ended #include "customization\endConditions.sqf" //DO NOT REMOVE //The time limit in minutes variable called FW_TimeLimit is set in customization/settings.sqf, to disable the time limit set it to 0 if ((time / 60) >= FW_TimeLimit && FW_TimeLimit != 0) exitWith { //It is recommended that you do not remove the time limit end condition FW_TimeLimitMessage call FNC_EndMission; }; }; }; }; #include "modules\modules.sqf" //DO NOT REMOVE #include "core\postChecks.sqf" //DO NOT REMOVE My AddAction looks like this. It threw some errors due to _player and that variable being undefined so I reverted back to 'player' as that worked inbefore the changes. //Fnc_popup = compile preprocessFileLineNumbers "customization\popups.sqf"; /*if (!isDedicated) then { waitUntil { (player == player) }; if (player getVariable "isInstructor") then { conrepboard addAction ["<t color='#FF2222'>Reveal Arrows",{"reveal" execVM "customization\arrows.sqf";}]; conrepboard addAction ["<t color='#FF2222'>Hide Arrows",{"hide" execVM "customization\arrows.sqf";}]; arBoard addAction ["<t color='#FF2222'>Raise Bunker Targets",{[true,"setup",15,bnkTgts] remoteExec ["Fnc_popup", 2];}]; arBoard addAction ["<t color='#FF2222'>Lower Bunker Targets",{[false,"reset",15,bnkTgts] remoteExec ["Fnc_popup", 2];}]; grnBoard addAction ["<t color='#FF2222'>Raise Trench Targets",{[false,"setup",15,grnTgts] remoteExec ["Fnc_popup", 2];}]; grnBoard addAction ["<t color='#FF2222'>Lower Trench Targets",{[false,"reset",15,grnTgts] remoteExec ["Fnc_popup", 2];}]; bldBoard addAction ["<t color='#FF2222'>Raise House Targets",{[false,"setup",15,hseTgts] remoteExec ["Fnc_popup", 2];}]; bldBoard addAction ["<t color='#FF2222'>Lower House Targets",{[false,"reset",15,hseTgts] remoteExec ["Fnc_popup", 2];}]; grnPraBoard addAction ["<t color='#FF2222'>Raise Practice Targets",{[false,"setup",3,grnPraTgts] remoteExec ["Fnc_popup", 2];}]; grnPraBoard addAction ["<t color='#FF2222'>Lower Practice Targets",{[false,"reset",3,grnPraTgts] remoteExec ["Fnc_popup", 2];}]; }; }; */ if (!isDedicated) then { // params ["_player"]; if (player getVariable ["isInstructor", false]) then { conrepboard addAction ["<t color='#FF2222'>Reveal Arrows",{"reveal" execVM "customization\arrows.sqf";}]; conrepboard addAction ["<t color='#FF2222'>Hide Arrows",{"hide" execVM "customization\arrows.sqf";}]; arBoard addAction ["<t color='#FF2222'>Raise Bunker Targets",{["setup",15,bnkTgts,true] remoteExec ["Fnc_popup", 2];}]; arBoard addAction ["<t color='#FF2222'>Lower Bunker Targets",{["reset",15,bnkTgts,false] remoteExec ["Fnc_popup", 2];}]; grnBoard addAction ["<t color='#FF2222'>Raise Trench Targets",{["setup",15,grnTgts,false] remoteExec ["Fnc_popup", 2];}]; grnBoard addAction ["<t color='#FF2222'>Lower Trench Targets",{["reset",15,grnTgts,false] remoteExec ["Fnc_popup", 2];}]; bldBoard addAction ["<t color='#FF2222'>Raise House Targets",{["setup",15,hseTgts,false] remoteExec ["Fnc_popup", 2];}]; bldBoard addAction ["<t color='#FF2222'>Lower House Targets",{["reset",15,hseTgts,false] remoteExec ["Fnc_popup", 2];}]; grnPraBoard addAction ["<t color='#FF2222'>Raise Practice Targets",{["setup",3,grnPraTgts,false] remoteExec ["Fnc_popup", 2];}]; grnPraBoard addAction ["<t color='#FF2222'>Lower Practice Targets",{["reset",3,grnPraTgts,false] remoteExec ["Fnc_popup", 2];}]; }; }; The popups.sqf was changed to look nearly alike yours. As said I might have to do some more adaption and if's for the swivels, but I already ran into a script error that I can not find as for what I can see there, there is no missing bracket whatsoever: /////////////////////////////////////////////////////////////////////////////////////////// //Script to be called by inits or scripts for operating swivel and popup //targets around a specified object "_centerObj". //params: [ShouldTargetsAutoPop?,WhichSwitchShouldRun?,WhatDistanceFromObject?,WhatObject?] //By Pax /////////////////////////////////////////////////////////////////////////////////////////// params [ ["_execution", "init"], ["_distance", 500], ["_centerObj", initCenter], ["_popEnabled", false] ]; _targets = nearestObjects [position _centerObj, ["TargetBase", "Target_Swivel_01_base_F"], _distance]; switch (toLower _execution) do { case "init": { { //isKindOf Swivel else isKindOf popup if (typeOf _x isKindOf "Target_Swivel_01_base_F") then { _x setVariable ["BIS_poppingEnabled", false, true]; } else { _x setVariable ["nopop", true, true]; }; // Lower all targets defined in array _targets _x animateSource ["terc", 1]; }forEach _targets; }; case "setup": { //Make sure _targets are reset before running the setup phase (layerEightProtection) ["reset", _distance, _centerObj] call Fnc_popup; //Inform Instructor who asked for setup that the command was received "Command received - Targets are being setup" remoteExec ["systemChat", remoteExecutedOwner]; { //Is this target told to auto-pop? _x setVariable ["rePop", _popEnabled]; //Raise the target _x animateSource ["terc", 0]; //Add Hit EH and store the EH ID on the target _x setVariable [ "HitEH", _x addEventHandler [ "Hit", params [ "_target", "", "", "" ]; //If auto-pop was set if (_target getVariable "rePop") then { _target setVariable [ "rePopThread", _target spawn { sleep (1 + random 4); _this animateSource ["terc", 0]; }; ]; //No auto-pop set } else { //Bin Hit EH _target removeEventHandler ["Hit", _thisEventHandler]; //Clean Shit up _target setVariable ["HitEH", nil]; _target setVariable ["rePop", nil]; }; ] ]; } forEach _targets; }; case "reset": { //Inform Instructor of action "Command received - Targets are being reset" remoteExec ["systemChat", remoteExecutedOwner]; { //If the target for whatever reason still has an active EH: if !(isNil {_x getVariable "HitEH"}) then { //if auto-pop is set if (_x getVariable "rePop") then { //Is the target currently waiting to rePop? if (!isNil {_x getVariable "rePopThread"} && {!isNull (_x getVariable "rePopThread")}) then { //If it is waiting, terminate the Thread terminate (_x getVariable "rePopThread"); }; _x setVariable ["rePopThread", nil]; }; _x removeEventHandler ["Hit", _x getVariable "HitEH"]; _x setVariable ["HitEH", nil]; _x setVariable ["rePop", nil]; }; //Lower the targets _x animateSource ["terc", 1]; } forEach _targets; }; }; /* private _targets = nearestObjects [position _centerObj, ["TargetBase"], _distance]; private _SwivelTargets = nearestObjects [position _centerObj, ["Target_Swivel_01_base_F"], _distance]; switch (_execution) do { case "init": { { _x setVariable ["nopop", true]; _x animateSource ["terc",1] } forEach _targets; { _x setVariable ["BIS_poppingEnabled", false]; // _x setVariable ["BIS_leaningEnabled", false]; <-- aparently disables any animation physics, thx BI -.- _x animateSource ["terc",1]; } forEach _SwivelTargets; }; case "setup": { "setup called" remoteExec ["systemChat"]; // Normal Popuptargets if (_popEnabled) then { "popup first condition" remoteExec ["systemChat"]; { _x setVariable ["nopop", false]; _x animateSource ["terc",0]; _x addEventHandler [ "Hit", { "popup first condition EH animate" remoteExec ["systemChat"]; (_this select 0) animateSource ["terc",1]; (_this select 0) setVariable ["popdelay", 1 + (random 5)]; // [{ // (_this select 0) animateSource ["terc",0]; // "popup first condition EH in CBA" remoteExec ["systemChat"]; // }, // [_this], 2 + (random 3)] call CBA_fnc_waitAndExecute; } ] } forEach _targets; } else { "popup second condition" remoteExec ["systemChat"]; { _x animateSource ["terc",0]; _x addEventHandler [ "Hit", { (_this select 0) animateSource ["terc",1]; (_this select 0) removeEventHandler ["Hit",0]; } ] } forEach _targets; }; // Swivel targets if (_popEnabled) then { "swivel first condition" remoteExec ["systemChat"]; { _x setVariable ["BIS_poppingEnabled", true]; _x setVariable ["BIS_leaningEnabled", true]; _x animateSource ["terc",0]; _x addEventHandler [ "HitPart", { ((_this select 0) select 0) animateSource ["terc",1]; ((_this select 0) select 0) setVariable ["popdelay", 1 + (random 5)]; // [{ // ((_this select 0) select 0) animateSource ["terc",0]; // }, // [_this], 2 + (random 3)] call CBA_fnc_waitAndExecute; } ] } forEach _SwivelTargets; } else { "swivel second condition" remoteExec ["systemChat"]; { _x setVariable ["BIS_leaningEnabled", true]; _x animateSource ["terc",0]; _x addEventHandler [ "HitPart", { ((_this select 0) select 0) setVariable ["BIS_leaningEnabled", false]; ((_this select 0) select 0) animateSource ["terc",1]; ((_this select 0) select 0) removeEventHandler ["HitPart",0]; } ] } forEach _SwivelTargets; }; }; case "reset": { "reset called" remoteExec ["systemChat"]; { _x setVariable ["nopop", true]; _x removeEventHandler ["Hit",0]; _x animateSource ["terc",1]; } forEach _targets; { _x setVariable ["BIS_poppingEnabled", false]; _x setVariable ["BIS_poppingEnabled", false]; _x RemoveEventHandler ["HitPart",0]; _x animateSource ["terc",1]; } forEach _SwivelTargets; }; }; */ Greetings Pax
  17. Quick checkin, sofar I still haven't been able to make the eventhandler execute properly with the dedicated server and swivel targets. EH on the normal popup targets seem to work, but the delay code within the EH still isn't executed at all for whatever reason. I only have a few hours over the next days to spare so I might not spend them on the scripts. I will check back in next weekend, with a hopefully working solution or a workaround or a script that only uses popup targets vs with swivels as these start to set my brain on fire.
  18. ... thanks, I guess? Thank you, I did not know this fuction until now, I have to check if it works in unscheduled environment like eh tho, will do that over the next 2 days. Because I am absolutely unknowledgable in sqf (scripting in general) compared to you guys. Oh wow Larrow, I will definitely will incorporate a lot of this in my new try, especially the stuff with reducing the two arrays of taregts into one and then asking for its kind, that is super neat. Thanks alot guys! I'll be back if it works and post the solution or doesn't work and ask for furhter assistance ^^'
  19. I am baffled. I checked everything I know. objects are local to the server, scripts are executed for the server only, I tried to get rid of the cba fnc by using "popdelay" which does not work either. I will continue to shift some stuff around and if that won't work I might just settle for not using swivel targets in that MP mission.
  20. I looked at cba docs and if I understand it right, args need to be in brackets if I get that right so I now have: [_this] instead of _this, do I need to also enclose 2 + (random 3) as (2 + (random 3))? But I absolutely not sure what the locality and variable issues could be that you mentioned. All variables are local to each execution and are not used outside of popup.sqf. It would be much appriciated if you could elaborate on your findings.
  21. thats the opening bracket for CBA_fnc_waitAndExecute
  22. Hello ACE Team, BI thought this and other stuff would be a good idea (drugs... maybe, I don't know...) Please fix (*remove)[**override][(***exchange by something better)] kind regards, a fan (yes, I can spin fast)
×