Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by pierremgi

  1. Imho, you have to rework the code. Mind for the trap to define badly onEachFrame for each units (condition true), instead of writing a global MEH eachFrame. See the first note here. It's important! So, in few words, Your MEH eachFrame should do the job, your loop included! and you just have to define (or pass variables by global ones or set/getVariable on units) as conditions.
  2. Did you define _mahfriend before your first condition? If not, start with something like: private _mahfriend = TRUE;
  3. pierremgi

    Enhanced Movement

    I hope @bad benson will do something for the link on Steam. As subscriber, that's the first page you read.
  4. What for? More cheat codes on servers?
  5. The code works for me. Did you write the same array (with helos only) in the vehicles types (here are the helos you spawn)? Did you place your virtual module not too close from player? _this spawn MGI_fnc_dropVeh; // must be in the vehicle init , not the crate one! The function itself can be anywhere but run by players (so in init.sqf, or in any init field of an edited object, or even in a trigger set to true as condition). Just for info, this code is now embedded into MGI advanced modules. You just have to link some vehicles + crates to my module (this one is linked to the virtual module). In this module, if the number of vehicles is equal to the number of crates, they are coupled. If not, payload is randomized.
  6. Hi all, I'm frequently scripting around BI modules overriding. I scripted some "multiple bombs" + "napalm" CAS for thus who knows MGI tactical pack addon. Today, I'd like to share a little script if you would like to drop a car (any vehicle) instead of a crate. Place a BI support module (virtual drop). It should work also with a real support. Not tested. Name it. Don't forget the BI support requester, sync modules as usual. In the BI module, write all vehicle types you want (helicopter classes existing in your cfgVehicles); In my example, as I'm fond of UNSUNG: ["uns_ach47_m200","uns_ch47_m60_army"] and this remark: the APEX V44 Blackfish ("B_T_VTOL_01_armed_F") is a plane but you can use it for faster drop! add what you want in the crate init, for example, I like to signal the crate with smoke/flare and add virtual arsenal on it: [_this,{ _this addAction ["<t color='#ffff11'>Arsenal</t>", {["Open",true] spawn BIS_fnc_arsenal},nil,10,false,true,"", ""]} ] remoteExec ["call"]; _flare = if (sunOrMoon <0.5) then [{"F_20mm_Yellow"},{"smokeShellYellow"}]; _fumi = _flare createvehicle getPosATL _this; _fumi attachTo [_this,[0,0,-2]]; Remark: this code is for standard drop of a crate, but will be overridden with vehicle code. add a simple calling code in the Vehicle init of the module (here vehicle is the helicopter, not the parcel!): _this spawn MGI_fnc_dropVeh with the following remark: I use to compile sqf in init.sqf: MGI_fnc_dropVeh = compileFinal preprocessFileLineNumbers "MGI_fnc_dropVeh.sqf"; (You can also directly execVM it, writing _this execVM "MGI_fnc_dropVeh.sqf" in vehicle init of the module). Now, the sqf code: MGI_fnc_dropVeh.sqf: Last version 03rd/08/18 _veh = _this; if !(_veh isKindOf "uns_ach47_m200") exitWith {}; comment "choose the helicopter class you want for car drop, the other ones will drop simple crates."; _home = getpos _this; _grpVeh = group _veh; sleep 3; _currentwpt = [_grpVeh, currentWaypoint _grpVeh]; _currentwptPos = waypointPosition _currentwpt; _currentwptdesc = waypointDescription _currentwpt; deleteWaypoint _currentwpt; _wpt = _grpVeh addWaypoint [_currentwptPos,0]; _wpt setWaypointDescription _currentwptdesc; _wpt setWaypointStatements ["TRUE", " if (isServer) then { [this, this getVariable 'BIS_SUPP_supportRunCoords', 'B_Parachute_02_F', 'B_MRAP_01_hmg_f', this getVariable 'BIS_SUPP_selectedModule'] spawn { _pilot = _this select 0; _wpPos = _this select 1; _chuteType = _this select 2; _crateType = _this select 3; _crateCode = compile ""[_this,{_this addAction ['Arsenal',{['Open',true] spawn BIS_fnc_arsenal},nil,10,false,true,'', '']}] remoteExec ['call']; _flare = if (sunOrMoon <0.5) then [{'F_20mm_Yellow'},{'smokeShellYellow'}]; _fumi = _flare createvehicle getPosATL _this; _fumi attachTo [_this,[0,0,-2]]""; comment 'optional remove the _crateCode line if you dont want an arsenal'; _oldDist = _pilot distance _wpPos; while {_oldDist >= _pilot distance _wpPos} do { _oldDist = _pilot distance _wpPos; sleep 0.1 }; _pilot setVariable ['BIS_SUPP_supporting', FALSE]; _chute = createVehicle [_chuteType, [100, 100, 200], [], 0, 'FLY']; _chute setPos [position _pilot select 0, position _pilot select 1, (position _pilot select 2) - 50]; _crate = createVehicle [_crateType, position _chute, [], 0, 'NONE']; vehicle _pilot setVariable ['MGI_crate',_crate,true]; _crate call _crateCode; comment 'to be removed also, if the _crateCode line is removed above.'; _crate attachTo [_chute, [0, 0, 0]]; waitUntil {position _crate select 2 < 3 || isNull _chute}; detach _crate; _chute setVelocity [0,5,0]; vehicle _pilot setVariable ['MGI_crate',nil,true]; }; }; "]; _grpVeh setCurrentWaypoint _wpt; _wp2 = _grpVeh addWaypoint [_home, 0]; _wp2 setWaypointType "Move"; _wp2 setWaypointBehaviour "SAFE"; _wp2 setWaypointStatements ["TRUE", "vehicle this land 'LAND'"]; _veh land "none"; waitUntil {!isnil {_veh getVariable "MGI_crate"}}; sleep 60; {deleteVehicle _x} forEach crew _veh; deleteVehicle _veh; Hope you'll have fun with that. An adapted version is now included in the MGI advanced Modules addon.
  7. pierremgi

    Enhanced Movement

    Thanks... but no need to yell.
  8. pierremgi

    Enhanced Movement

    Setting menu lost... and video link broken.
  9. You're right the LOD fire ifire, view, geom work on map but not out of map (black surface in editor). I checked with checkVisibility from eyePos player (on deck) to the sea level right below... 0 when carrier is on map, 1 out of map... EDITED: and cursorObject returns the hull part when on map, objNull out of map.
  10. Use the lineIntersectsObjs example 1
  11. In my addons, I remoteExec playMoveNow on the PC which own the unit and I remoteExec everywhere the switchMove "" which breaks the current move if needed.
  12. @gc8 Your code is returning 23 m which is the height of the main deck above the sea.
  13. No, you don't need any mod. It's simple as 3den > attributes menu > multiplayer > respawn section. The only missing thing you have to add in description.ext is respawnOnStart which is weirdly set to 1 by default. For all other features, just choose what you need here.
  14. Frankly, I never used the isGlobal = 2... Just 0 for server modules , 1 for players (they are all running the mission.sqm so the module, right?, even when JIP). Tested several times with JIP on dedi server... So, I don't understand in what case I'd use the isGlobal = 2 rather than 1. That remains a mystery for me.
  15. instead of: BRG_fnc_TelePort = {if (!_shift and _alt) then {(call compile BRG_TPObj) setpos _pos}}; BRG_TPOn = {if (!BRG_TPStatus) then {BRG_TPStatus = true; ["BRG_TP", "onMapSingleClick", BRG_fnc_TelePort, 0] call BIS_fnc_addStackedEventHandler;}; try: BRG_fnc_TelePort = {_pos = _this; if (!_shift and _alt) then {(call compile BRG_TPObj) setpos _pos}}; BRG_TPOn = {if (!BRG_TPStatus) then {BRG_TPStatus = true; ["BRG_TP", "onMapSingleClick", _pos call BRG_fnc_TelePort, 0] call BIS_fnc_addStackedEventHandler;};
  16. Interesting. I'm discovering the tool. Are you using hardlink (for true updated copy if I'm right), or symbolic link? In this case, I understand it's just a link, so what about when you pbo the mission with sub-folders definitions & paths? And perhaps, even heavy scenarios don't exceed few Mo, so a smart copy with LSE should be fine...
  17. pierremgi

    exitWith if subtract

    _amount = _amount max 0 Every negative value will be treated as 0.
  18. Sure, follow the parameters described in your first link but don't spawn the code on each loop, and choose carefully the duration... So ease your loop! I mean there is no need to "refresh" such info on each frame (especially spawning this function with its duration). So, add something "waiting" for any different count, like: [] spawn { while {alive player} do { _totalEnemy = {alive _x && side _x == resistance} count allUnits; waitUntil {uiSleep 1; ({alive _x && side _x == resistance} count allUnits) != _totalEnemy}; [format ["Hostiles Remaining: %1", _totalEnemy ],-1,-1,3,1,0,789] spawn BIS_fnc_dynamicText; uiSleep 1; }}; Now if you need a permanent display, like in wasteland, alive or else, you need to write a display. More difficult.
  19. The only way, on my mind, is to use create3denComposition . I don't know how you can do that with Zeus. Perhaps with a custom module workable for Zeus. Never tested that.
  20. I'm not sure to understand: - why you are using isFlatEmpty? This command is already embedded inside Bis_fnc_findSafePos (check the function viewer) - why you're breaking to outOfWhile if you're re-running the loop with the same conditions? (in fact the randomization on players will change the tested position, but there is some chance to re-run the exact same code (and re-spawn fnc_VABC_Spwn1 as duplication), especially if the number of players is few. I'd rather make a while true loop, a code with a timer check, some conditions for spawning and starting the timer to freeze the code for a due delay. I'd rather write the exitWith on _allplayers check.
  21. Yep I experienced that. If you spawn: - custom units with native enemy side (see configfile >> "CfgVehicles" >> typeOf yourUnit >> "side") , the AIs will fire at him when dropped. The workaround is to wait for !isnull objectParent yourUnit then change the side of the unit. - For custom aircraft, yes, the Warlord creates the crew depending on native side of the vehicle... So, you have to wait for the crew and make them join the right side. This script should work on server: 0 = [] spawn { While {true} do { _allUnits = allUnits select {side group _x != side _x && {alive _x} && {objectParent _x isKindOf "air"} && {isNil {_x getVariable "unitPassedWl"}}}; { [_x] joinSilent group _x; _x setVariable ["unitPassedWl",true]; } forEach _allUnits; uisleep 2; } }; Perhaps it could be optimized with specific variable for spawned units...
  22. I neved had to remoteExec a joinSilent... and it's a command. I'm using that like you did previously, with no problem: - createUnit / joinSilent on dedicated server... but my script is for server only. So??? - That works fine for infantry. For vehicles, you need to use createVehicleCrew (before joinSilent on each crew). PS: on dedi, group player has no sense. So check your group, create a temporary one if you want but don't remoteExec this kind of command.
  23. Yes, I missed something previously. So, this code should work in SP/MP: this addAction ["<t color='#FFFF00'>WEAPONS TIGHT</t>", { params [ "_target", "_caller", "_id", "_turrets","_weapons"]; _turrets = allTurrets [_target,false]; if ((_target actionParams _id) select 0 == "<t color='#FFFF00'>WEAPONS TIGHT</t>") then { _weapons = _turrets apply {[_target currentWeaponTurret _x,_x]}; _target setVariable ["turretsDetail",_weapons,true]; [[_target,_weapons],{ params ["_target","_weapons"]; { [_target,_x] remoteExecCall ["removeWeaponTurret",_target turretOwner _x#1]; } forEach (_weapons select {getNumber (configfile >> "CfgWeapons" >> _x#0 >> "type") == 65536}) }] remoteExecCall ["call",2]; _target setUserActionText [_id,"<t color='#ff1111'>WEAPONS FREE</t>"]; } else { _weapons = _target getVariable ["turretsDetail",["",[-1]]]; [[_target,_weapons],{ params ["_target","_weapons"]; { [_target,_x] remoteExecCall ["addWeaponTurret",_target turretOwner _x#1]; } forEach (_weapons select {getNumber (configfile >> "CfgWeapons" >> _x#0 >> "type") == 65536}) }] remoteExecCall ["call",2]; _target setUserActionText [_id,"<t color='#FFFF00'>WEAPONS TIGHT</t>"]; } }, [], 1, false, true, "", "driver _target isEqualTo _this" ]; EDITED. Not tested in MP...
  24. Markers and event triggers (if you don't mess with hard conditions) don't hurt. For objects and units, you hit the point BI created the dynamic simulation and the garbage collection, waiting for better days... Arma4/enfusion in 2022?