Zunder Giles 2 Posted November 18, 2020 Hello, I'm new around here. I created a campaign with the ALiVE mod on the Workshop and, although I absolutely do not know how to code, I decided to add your script with an additional function: when the player is on the map and he must click to launch the HALO jump, if he decides to cancel his jump he has no possibilities. So: when the player has NOT clicked on the map AND exits the map THEN the HALO jump is canceled. Here are the changes to your script that I made: Spoiler /* Paste this in the Init field of a Flag : (jump.jpg is a .jpg file at the root of the mission) this setobjecttexture [0, "jump.jpg"]; 0 = [this,2500,150] execVM "Scripts\MGI_Scripts\MGI_HALO.sqf"; */ params [["_pole",objNull,[objNull]],["_jump_alt",2000,[0]],["_jump_safety",90,[0]]]; MGI_compHALO = compileFinal " _plyr = _this; MGI_fnc_orient = { _obj = _this select 0; _p = _this select 1; _obj setVectorDirAndUp [ [ 0,cos _p,sin _p], [[0,-sin _p,cos _p],0] call BIS_fnc_rotateVector2D ] }; _plyr setVariable ['bpk',unitBackpack _plyr]; if (backpack _plyr != '') then { _whs = createVehicle ['WeaponHolderSimulated_Scripted',getpos _plyr,[],0,'can_collide']; _plyr action ['DropBag', _whs, typeOf (_plyr getVariable 'bpk')]; ['EHid','onEachFrame', { params ['_plyr','_whs']; if (backpack _plyr != 'B_parachute') then { _plyr action ['dropBag', _whs, typeOf (_plyr getVariable 'bpk')]; _plyr action ['AddBag', _whs, 'B_Parachute'] }; call{ if (stance _plyr == 'UNDEFINED') exitWith { _whs attachTo [_plyr,[-0.1,-0.05,-0.7],'leaning_axis']; [_whs,-180] call MGI_fnc_orient }; if (stance _plyr != 'UNDEFINED') exitWith { _whs attachTo [_plyr,[-0.1,0.75,-0.05],'leaning_axis']; [_whs,-90] call MGI_fnc_orient }; }; if (isNil {_plyr getVariable ['bpk',nil]}) then { ['EHid', 'onEachFrame'] call BIS_fnc_removeStackedEventHandler }; },[_plyr,_whs] ] call BIS_fnc_addStackedEventHandler }; "; waitUntil {time >0 && count allPlayers >0 }; _pole addAction ["<img size='1' image='\A3\Air_F_Beta\Parachute_01\Data\UI\Portrait_Parachute_01_CA'/><img size='2' image='\A3\Air_F_Beta\Parachute_01\Data\UI\Portrait_Parachute_01_CA'/><img size='1' image='\A3\Air_F_Beta\Parachute_01\Data\UI\Portrait_Parachute_01_CA'/><br/><t color='#ff9900'><t size='1.25'>Group HALO Jump</t>",{ params ["_target","_caller","_id","_parameters"]; openmap [true,false]; // Hint / help for players [ [ ["Group HALO Jump :", "<t align = 'right' shadow = '1' size = '0.7' font='PuristaBold'>%1</t><br/>"], ["Allowed for the whole squad.", "<t align = 'right' shadow = '1' size = '0.5'>%1</t><br/>"], ["(help in 'HALO Jump Manual')", "<t align = 'right' shadow = '1' size = '0.5'>%1</t>", 15] ] ] spawn BIS_fnc_typeText; titleText["Select Map Position", "PLAIN"]; systemChat "Left click on the map where you want to insert."; systemChat "Or close map to abort."; _parameters params ["_jump_alt","_jump_safety"]; // Variable used in the waitUntil : false = no click done yet on the map groupmapclick = false; uisleep 1; ["Jump","onMapSingleClick", { // Variable is true since onMapSingleClick is done at this point groupmapclick = true; uisleep 1; // add text and sound systemChat "Automatic Activation Device (AAD) will activate itself if altitude reaches 150m above the ground."; playSound "C130_exit"; 0 cutText ["","black",0.01,true]; params ["","_pos","","","_jump_alt","_jump_safety","_MGI_forSquad"]; _caller = player; _MGI_units = (units _caller) select {local _x && alive _x && _x distanceSqr _caller < 100000 && isnull objectParent _x}; { [_x,_forEachIndex,_pos,_jump_alt,_jump_safety] spawn { params ["_unit","_index","_pos","_jump_alt","_jump_safety"]; private ["_bpk","_bpktype","_whs","_para"]; if (isPlayer _unit) then { _unit call MGI_compHALO; }; uisleep 2; _unit allowDamage false; _unit setPos [(_pos select 0)-60 + random 30,(_pos select 1) -60 + random 30, (_jump_alt max 200) + (12 *_index)]; waitUntil {(getpos _unit select 2) > _jump_safety -50}; uisleep 0.2; if (isPlayer _unit) then { _bpk = _unit getVariable "bpk"; _bpktype = typeOf (_unit getVariable "bpk"); _whs = objectParent _bpk; _unit addBackpackGlobal "B_parachute"; }; 0 cutText ["","black in",1,true]; waitUntil {(getpos _unit select 2) < ([_jump_safety max 90,_jump_safety] select (isPlayer _unit)) +20 or (!isnull objectParent player) }; if (!isplayer _unit) then { uisleep 0.8; _chute = createVehicle ["Steerable_Parachute_F", getpos _unit, [], 0, "can_collide"]; _unit moveInDriver _chute; } else { _unit allowDamage true; if (!isTouchingGround _unit) then { _unit action ["OpenParachute", _unit]; } }; _para = objectParent _unit; waitUntil {!isnull _para}; _para allowDamage false; waitUntil {sleep 0.5; (isTouchingGround _unit && isNull _para) or surfaceIsWater (getpos _unit) or !alive _unit}; if (isPlayer _unit) then { _unit setVariable ["bpk",nil]; waitUntil {isNull _para}; deleteVehicle _para; sleep 0.5; detach _whs; if (!isNull _whs) then { _unit action ["AddBag",objectParent _bpk, _bpktype]; sleep 2; deleteVehicle _whs; }; } else { uisleep 2; _unit allowdamage true; }; }; } forEach _MGI_units; openmap [false,false]; ["Jump","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; false },_parameters] call bis_fnc_addStackedEventHandler; // Check if Variable groupmapclick is true or if the map isn't anymore visible waitUntil {(!groupmapclick && !visibleMap) or groupmapclick}; uisleep 1; /* 3 option here Option A : the player didn't left click anywhere AND map is open => waitUntil is doing his job Option B : the player did left click somewhere => the EvenHandler is doing his job and he will close the map himself Option C : the player close the map */ if (groupmapclick) then { //systemChat "Free Fall !" }; // Option C : check if groupmapclick is still false (condition "false groupmapclick" = true) AND the map is close (condition "false visibleMap" = true) if (!groupmapclick && !visibleMap) then { // remove the EH ["Jump","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; // onMapSingleClick is doing nothing anymore onMapSingleClick ""; systemChat "Jump cancelled."; openmap [false,false] }; },[_jump_alt,_jump_safety], 5,false, true,"","vehicle _this == _this"]; Everything works as expected, only I have a generic error in an expression when launching the HALO jump. This is due to the expression "groupmapclick" which is = false as normal and when we click to launch the jump it changes to = true, so there is a missmatch type problem. My problem is that I don't know how to properly create this variable, because if I write _groupmapclick, the "if" functions start doing anything. Sorry, I never learned to code, I just figured out some function by reading the Bohemia wiki pages. If you could help me I would be very grateful to you, thanks in advance 🙂 2 Share this post Link to post Share on other sites
pierremgi 4886 Posted November 18, 2020 Thanks for this report. Corrected (front page) Module will also be fixed soon, on next update. 1 2 Share this post Link to post Share on other sites
Zunder Giles 2 Posted November 19, 2020 8 hours ago, pierremgi said: Thanks for this report. Corrected (front page) Module will also be fixed soon, on next update. Thank you very much for your response. In fact, it was much simpler than I had imagined. I still wanted to add confirmation for the player in case of cancellation. So before the EH I wrote this // Variable used to confirm cancellation : false = no click done yet on the map groupmapclick = false; uisleep 1; Then at the very beginning of EH this // Variable is true since onMapSingleClick is done at this point groupmapclick = true; and finally after the last waitUntil this // Option C : check if groupmapclick is still false (condition "false groupmapclick" = true) if (!groupmapclick) then { systemChat "Jump cancelled." }; Everything works perfectly and there are no errors anywhere. Thanks again 🙂 However I draw your attention to the cobra4v320 script AI HALO Jump Why ? because there are three ... disturbing things in your script. 1) you can always reload your weapon in mid-flight 2) you can always open your inventory in mid-flight 3) I use this script to save and reload my equipment https://forums.bohemia.net/forums/topic/139848-getset-loadout-saves-and-loads-pretty-much-everything/?do=findComment&comment=3097749 Quote initPlayerLocal.sqf [missionNamespace, "arsenalClosed", { player setVariable ["Saved_Loadout",getUnitLoadout player]; }] call BIS_fnc_addScriptedEventHandler; onPlayerRespawn.sqf (unchanged original file from R3vo) player setUnitLoadout (player getVariable ["Saved_Loadout",[]]); and this causes the appearance of a bag at our feet in the air, bag that we can try to take (even if it is impossible) Possibly the interesting part to add to your script is this: "// save the backpack and its contents, also adds fake pack to front of unit" Voila, I don't know if you will find this interesting to add (also if it is easy or not to add), and I do not know if you want or not to fix the "bug" of the possibility of opening the inventory and reload the weapon in mid-flight. In any case, well done for your script, I am unable to do the same. Thank you very much 🙂 Share this post Link to post Share on other sites
pierremgi 4886 Posted November 19, 2020 1 hour ago, Zunder Giles said: 1) you can always reload your weapon in mid-flight 2) you can always open your inventory in mid-flight 3) I use this script to save and reload my equipment 1 - that's not so bad. The cinematic is not realistic, but it's already the case. I'll let it as is. 2 - fixed (front page). You can't open the inventory during the HALO anymore. 3 - not related imho, it was just a consequence of the inventory problem. 1 Share this post Link to post Share on other sites
Zunder Giles 2 Posted November 19, 2020 7 hours ago, pierremgi said: 1 - that's not so bad. The cinematic is not realistic, but it's already the case. I'll let it as is. 2 - fixed (front page). You can't open the inventory during the HALO anymore. 3 - not related imho, it was just a consequence of the inventory problem. Hello. First of all, a huge thank you for taking my comments into account. I did a lot of testing so: 1- indeed it is not very serious (the reloading of weapon) so, who cares. 2- Excellent! it works perfectly well, thank you ! 3- you were right, this was only related to being able to open the inventory: problem solved with your correction. Unfortunately, there is just one small error, the player recovers his equipment except his backpack and the contents; the AI seems to be getting its backpack and contents back, so it's only relative to the player. Here is the .rpt at the launch of the mission : Error in expression <f (backpack _plyr != 'B_parachute') then { _plyr action ['dropBag',> Error position: < { _plyr action ['dropBag',> Error Nombre incorrect dans une expression (incorrect number in expression) Attempt to override final function - mgi_comphalo at the launch of the HALO jump : Error in expression <tVariable "bpk"); _whs = objectParent _bpk; _unit addBackpackGlobal "B_parac> Error position: <_bpk; _unit addBackpackGlobal "B_parac> Error Variable indéfinie dans une expression(undefined Variable in expression): _bpk Error in expression <eleteVehicle _para; sleep 0.5; detach _whs; if (!isNull _whs) then { _unit a> Error position: <_whs; if (!isNull _whs) then { _unit a> Error Variable indéfinie dans une expression: _whs I'm not sure I can be of more use to you than that. Hoping that is enough. good luck 🙂 Share this post Link to post Share on other sites
zagor64bz 1225 Posted November 19, 2020 This is with the "old" version, that I've been using for ages..no problem on my end... ..and, no, I couldn't open the inventory mid-flight either...but I could reload.(no biggy) Share this post Link to post Share on other sites
pierremgi 4886 Posted November 19, 2020 Well, Yesterday, I did a little test on weaponholder and created on "none" special state instead of "can_collide"... falling back to "can_collide". In some maps the backpack falls underground. There is an Arma engine attempting to disablesimulation for sinking object to keep them underground, no more sinking... Well a lot of codes during the action dropBag, imho. Front page is back to previous weaponholder... tweaked for its position. That's probably fine for most of cases. If you experience some error or bad result, please give details: map, type of units/ backpack, positions (for the slope at start, at arrival). Only report facts for non-modified script (the front paged one). It's up to you for any change but take it on. At least, say what you did. Share this post Link to post Share on other sites
xystron 1 Posted January 20, 2021 Hi, I'm trying to add this script to our server's mission of Antistasi to a unit (Petros), but I am having some issues. It has been a while editing a mission and scripts, so please treat me like a novice. First, I am using the script as-is for Antistasi-Altis-BLUFOR-2-3-2 @ https://github.com/official-antistasi-community/A3-Antistasi/releases . It is being run on a hosted server. I have added the script you provided on the front page to the mission in squadscripts\MGI_HALO.sqf. Currently, I am trying to see how to actually add your script to work with either Petros or the FIA flagpole. I've located in fn_flagaction.sqf located in functions\Base\fn_flagaction.sqf and am trying to figure out how to go about adding the action to petros via addAction or other. Here is the code in the sqf: #include "..\Garage\defineGarage.inc" private ["_flag","_typeX"]; if (!hasInterface) exitWith {}; _flag = _this select 0; _typeX = _this select 1; switch _typeX do { case "take": { removeAllActions _flag; _actionX = _flag addAction ["<t>Take the Flag<t> <img image='\A3\ui_f\data\igui\cfg\actions\takeflag_ca.paa' size='1.8' shadow=2 />", A3A_fnc_mrkWIN,nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; _flag setUserActionText [_actionX,"Take the Flag","<t size='2'><img image='\A3\ui_f\data\igui\cfg\actions\takeflag_ca.paa'/></t>"]; }; case "unit": { _flag addAction ["Unit Recruitment", {if ([player,300] call A3A_fnc_enemyNearCheck) then {["Unit Recruitment", "You cannot recruit units while there are enemies near you"] call A3A_fnc_customHint;} else { [] spawn A3A_fnc_unit_recruit; };},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4] }; case "vehicle": { _flag addAction ["Buy Vehicle", {if ([player,300] call A3A_fnc_enemyNearCheck) then {["Buy Vehicle", "You cannot buy vehicles while there are enemies near you"] call A3A_fnc_customHint;} else {createDialog "vehicle_option"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4] }; case "mission": { petros addAction ["Mission Request", {CreateDialog "mission_menu";},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and ([_this] call A3A_fnc_isMember) and (petros == leader group petros)",4]; petros addAction ["HQ Management", A3A_fnc_dialogHQ,nil,0,false,true,"","(_this == theBoss) and (petros == leader group petros)", 4]; petros addAction ["Move this asset", A3A_fnc_moveHQObject,nil,0,false,true,"","(_this == theBoss)"]; petros addAction ["<t color='#DE951F'>Solo Halo</t> ", "delta6\ghst_halo.sqf", [false,600,70], 5, true, true, "","alive _target"]; }; case "truckX": { actionX = _flag addAction ["<t>Transfer Ammobox to Truck<t> <img image='\A3\ui_f\data\igui\cfg\actions\unloadVehicle_ca.paa' size='1.8' shadow=2 />", A3A_fnc_transfer,nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])"] }; //case "heal": {if (player != _flag) then {_flag addAction [format ["Revive %1",name _flag], { _this spawn A3A_fnc_actionRevive; },nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])"]}}; case "heal": { if (player != _flag) then { if ([_flag] call A3A_fnc_fatalWound) then { _actionX = _flag addAction [format ["<t>Revive %1 </t> <img size='1.8' <img image='\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_reviveMedic_ca.paa' />",name _flag], A3A_fnc_actionRevive,nil,6,true,true,"","!(_this getVariable [""helping"",false]) and (isNull attachedTo _target)",4]; _flag setUserActionText [_actionX,format ["Revive %1",name _flag],"<t size='2'><img image='\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_reviveMedic_ca.paa'/></t>"]; } else { _actionX = _flag addAction [format ["<t>Revive %1 </t> <img size='1.8' <img image='\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_revive_ca.paa' />",name _flag], A3A_fnc_actionRevive,nil,6,true,true,"","!(_this getVariable [""helping"",false]) and (isNull attachedTo _target)",4]; _flag setUserActionText [_actionX,format ["Revive %1",name _flag],"<t size='2'><img image='\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_revive_ca.paa'/></t>"]; }; }; }; case "heal1": { if (player != _flag) then { if ([_flag] call A3A_fnc_fatalWound) then { _actionX = _flag addAction [format ["<t>Revive %1</t> <img size='1.8' <img image='\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_reviveMedic_ca.paa' />",name _flag], A3A_fnc_actionRevive,nil,6,true,false,"","!(_this getVariable [""helping"",false]) and (isNull attachedTo _target)",4]; _flag setUserActionText [_actionX,format ["Revive %1",name _flag],"<t size='2'><img image='\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_reviveMedic_ca.paa'/></t>"]; } else { _actionX = _flag addAction [format ["<t>Revive %1</t> <img size='1.8' <img image='\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_revive_ca.paa' />",name _flag], A3A_fnc_actionRevive,nil,6,true,false,"","!(_this getVariable [""helping"",false]) and (isNull attachedTo _target)",4]; _flag setUserActionText [_actionX,format ["Revive %1",name _flag],"<t size='2'><img image='\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_revive_ca.paa'/></t>"]; }; //_flag addAction [format ["Revive %1",name _flag], { _this spawn A3A_fnc_actionRevive; },nil,0,false,true,"","!(_this getVariable [""helping"",false]) and (isNull attachedTo _target)"]; _actionX = _flag addAction [format ["<t>Carry %1</t> <img image='\A3\ui_f\data\igui\cfg\actions\take_ca.paa' size='1.6' shadow=2 />",name _flag], A3A_fnc_carry,nil,5,true,false,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (isNull attachedTo _target) and !(_this getVariable [""helping"",false]);",4]; _flag setUserActionText [_actionX,format ["Carry %1",name _flag],"<t size='2'><img image='\A3\ui_f\data\igui\cfg\actions\take_ca.paa'/></t>"]; [_flag] call jn_fnc_logistics_addActionLoad; }; }; case "moveS": { _flag addAction ["Move this asset", A3A_fnc_moveHQObject,nil,0,false,true,"","(_this == theBoss)"] }; case "remove": { if (player == _flag) then { if (isNil "actionX") then { removeAllActions _flag; if (player == player getVariable ["owner",player]) then {[] call SA_Add_Player_Tow_Actions}; } else { _flag removeAction actionX; }; } else { removeAllActions _flag; }; }; case "refugee": { _flag addAction ["<t>Liberate</t> <img image='\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa' size='1.6' shadow=2 />", A3A_fnc_liberaterefugee,nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4] };//"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa" case "prisonerX": { _flag addAction ["<t>Liberate POW</t> <img image='\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa' size='1.6' shadow=2 />", A3A_fnc_liberatePOW,nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4] }; case "captureX": { // Uses the optional param to determine whether the call of captureX is a release or a recruit _flag addAction ["<t>Release POW</t> <img image='\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa' size='1.6' shadow=2 />", { _this spawn A3A_fnc_captureX; },false,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; _flag addAction ["Recruit", { _this spawn A3A_fnc_captureX; },true,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; _flag addAction ["Interrogate", A3A_fnc_interrogate,nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; }; case "buildHQ": { _flag addAction ["Build HQ here", A3A_fnc_buildHQ,nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4] }; case "seaport": { _flag addAction ["Buy Boat", {[vehSDKBoat] spawn A3A_fnc_addFIAVeh},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4] }; case "steal": { _flag addAction ["Steal Static", A3A_fnc_stealStatic,nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4] }; case "garage": { if (isMultiplayer) then { _flag addAction ["Personal Garage", { [GARAGE_PERSONAL] spawn A3A_fnc_garage;},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])", 4]; _flag addAction ["Faction Garage", { [GARAGE_FACTION] spawn A3A_fnc_garage; },nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])", 4]; } else { _flag addAction ["Faction Garage", { [GARAGE_FACTION] spawn A3A_fnc_garage; },nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])", 4] }; }; case "fireX": { fireX addAction ["Rest for 8 Hours", A3A_fnc_skiptime,nil,0,false,true,"","(_this == theBoss)",4]; fireX addAction ["Clear Nearby Forest", A3A_fnc_clearForest,nil,0,false,true,"","(_this == theBoss)",4]; fireX addAction ["I hate the fog", { [10,0] remoteExec ["setFog",2]; },nil,0,false,true,"","(_this == theBoss)",4]; fireX addAction ["Move this asset", A3A_fnc_moveHQObject,nil,0,false,true,"","(_this == theBoss)",4]; }; case "SDKFlag": { removeAllActions _flag; _flag addAction ["Unit Recruitment", {if ([player,300] call A3A_fnc_enemyNearCheck) then {["Unit Recruitment", "You cannot recruit units while there are enemies near you"] call A3A_fnc_customHint;} else { [] spawn A3A_fnc_unit_recruit; };},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; _flag addAction ["Buy Vehicle", {if ([player,300] call A3A_fnc_enemyNearCheck) then {["Buy Vehicle", "You cannot buy vehicles while there are enemies near you"] call A3A_fnc_customHint;} else {nul = createDialog "vehicle_option"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; if (isMultiplayer) then { _flag addAction ["Personal Garage", { [GARAGE_PERSONAL] spawn A3A_fnc_garage; },nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; _flag addAction ["Faction Garage", { [GARAGE_FACTION] spawn A3A_fnc_garage; },nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; } else { _flag addAction ["Faction Garage", { [GARAGE_FACTION] spawn A3A_fnc_garage; },nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4] }; }; case "Intel_Small": { _flag addAction ["Search for Intel", A3A_fnc_searchIntelOnLeader, nil, 4, true, false, "", "isPlayer _this", 4]; }; case "Intel_Medium": { _flag addAction ["Take Intel", A3A_fnc_searchIntelOnDocument, nil, 4, true, false, "", "isPlayer _this", 4]; }; case "Intel_Large": { _flag addAction ["Download Intel", A3A_fnc_searchIntelOnLaptop, nil, 4, true, false, "", "isPlayer _this", 4]; }; }; Because it is a little complicated for me to understand how Antistasi is handling "petros" and "flagx" to add the actions to the scroll-wheel, maybe there is a different way that I am not seeing that is much simpler, aside from Zeus teleporting players. Is there a way to actually just add an object via Zeus and add too the objects init via the debug console? I'm trying to keep it simple, if possible. Is it possible that someone can point me in the right direction, besides the door? Share this post Link to post Share on other sites
pierremgi 4886 Posted January 20, 2021 I'm not playing Antistasi and I don't want to dig into some other work. So, just add pole(s) in your scenario, hide them, move them, do what you want with them,.. add conditions for make them working as HALO point.... You will save time (and I also). 2 Share this post Link to post Share on other sites
xystron 1 Posted January 20, 2021 Got it. I'll just do that then. Thanks. Edit: I was able to get it to work as I originally wanted. Since the last time I had edited this mission was over two years ago, the structure has changed inside of the mission. As a result, I was editing the wrong file in the mission and had to sit for a while and understand how the files were now structured in the pbo. I was able to add the action to the map object, instead of the flag, that spawns with HQ as you move it around and added the HALO script to it. My apologies for taking up your time. Share this post Link to post Share on other sites
Robustcolor 31 Posted October 3, 2021 @pierremgi Everything seems to work except the re adding of the backpack upon landing. I used this script on the new dlc SOG, backpack landed on the ground next to the player then disappeared. Share this post Link to post Share on other sites
pierremgi 4886 Posted October 3, 2021 Can rarely occur. I can't play SOG for weeks, but if you found reproducible issue, try to test it with these hints: - did you make a "lot of" moves between the landing and the backpack end of recovery? - is it specific to an area (rice paddles, hills...)? - do you play other mods? Can you test without them? - have you a heavy scenario, resource and scheduler demanding? The HALO module is slightly different. If you have time, you could test it instead of script. Share this post Link to post Share on other sites
Robustcolor 31 Posted October 4, 2021 On 10/3/2021 at 6:18 PM, pierremgi said: Can rarely occur. I can't play SOG for weeks, but if you found reproducible issue, try to test it with these hints: - did you make a "lot of" moves between the landing and the backpack end of recovery? - is it specific to an area (rice paddles, hills...)? - do you play other mods? Can you test without them? - have you a heavy scenario, resource and scheduler demanding? The HALO module is slightly different. If you have time, you could test it instead of script. Yes, seems to only occur when making alot of moves upon landing. I removed these lines from the code below and the problem seems to have stopped. detach _whs; _whs setPos (_unit modelToWorld [0,-2,1]); if (!isNull _whs) then { detach _whs; _whs setPos (_unit modelToWorld [0,-2,1]); _unit action ["AddBag",objectParent _bpk, _bpktype]; sleep 2; deleteVehicle _whs; }; _unit removeEventHandler ['inventoryOpened',_unit getVariable 'lockInv']; } else { uisleep 2; _unit allowdamage true; }; Share this post Link to post Share on other sites
Robustcolor 31 Posted May 16, 2023 On 12/2/2017 at 10:21 PM, pierremgi said: 'WeaponHolderSimulated_Scripted Does all holders float beneath the player when using first person view? Looks ok when using third person view. Also, what's the reason for using false inside the stackedEH? On 12/2/2017 at 10:21 PM, pierremgi said: false },_parameters] call bis_fnc_addStackedEventHandler; Share this post Link to post Share on other sites
pierremgi 4886 Posted May 16, 2023 Does all holders float beneath the player when using first person view? Looks ok when using third person view. Strange question. Why ? The code is"onEachFramed" and the goal is to get backpack on ventral during the jump. Also, what's the reason for using false inside the stackedEH? That's the end of "onMapSingleClick" stackedEH, see onMapSingleClick specs. I probably set it to FALSE for saving the possibility of stacking other stackable "onMapSingleClick" EHs.... I don't remember exactly. Feel free to test it with TRUE... Share this post Link to post Share on other sites
Robustcolor 31 Posted May 16, 2023 31 minutes ago, pierremgi said: Strange question. Why ? Asking because it seems like all holders shows the backpack under the feets in first person view. Is there a work around for it? Share this post Link to post Share on other sites
pierremgi 4886 Posted May 17, 2023 9 hours ago, Robustcolor said: Asking because it seems like all holders shows the backpack under the feets in first person view. Is there a work around for it? Sorry, I can't reproduce that, neither with script, nor module. Backpack is ventral 1st or 3rd view. Did you change something? what is the context, backpack, MP or SP...? Share this post Link to post Share on other sites
Robustcolor 31 Posted May 17, 2023 4 hours ago, pierremgi said: Sorry, I can't reproduce that, neither with script, nor module. Backpack is ventral 1st or 3rd view. Did you change something? what is the context, backpack, MP or SP...? Nothing changed from your code, just wondering if it's suppose to look like this in first person view. Share this post Link to post Share on other sites
pierremgi 4886 Posted May 18, 2023 Nah. I suppose you're looking down with camera, and that occurs from time to time (or not) along with player's movements. I don't have any solution for that. Probably LODs related. Share this post Link to post Share on other sites