Jump to content

pierremgi

Member
  • Content Count

    7316
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by pierremgi

  1. So, what fires your trigger? I don't understand how you can have a disabled RED unit already inside the trigger without firing at start. I don't understand the chronology of your trigger and when thislist works for the truck.
  2. pierremgi

    Event on watch opened

    Which one? It's not an action "in menu" like "disassemble". "Watch" or "WatchToggle" aren't detected by the ingameUISetEH "action", if I'm right. Neither "rearm"... I don't know how to say that in English but input actions (UI EH "action" doesn't fire) seem to me different from Arma 3 actions (UI EH "action" fires).
  3. {_x enableSimulationGlobal true;} forEach thisList; Some questions - if OPFOR presence triggers, so what is the result of thislist ? You don't mention what is the side of the truck. - the enableSimulationGlobal works well for me. So verify thisList. Make the trigger on server only. - as far as the sim is disabled then enabled, you don't need to add a condition in the first waypoint (what for?)
  4. You need 2 triggers with area for presence (blufor present): - one immediate, say trg1, for the kill of the officer: In cond field: this && !alive officer1 - one delayed with a timeOut (check with 30 sec but works for 300), say tgr2 : in cond field : this add a 3rd trigger in cond. field : triggerActivated trg1 or triggerActivated trg2 link it to a task state module "succeeded" link the state module to the task module (created or assigned).
  5. You need to spawn a "groundWeaponHolder" (a sort of invisible recipient), instead of your grenades. Then fill it with your grenade (addItemCargoGlobal does the job).
  6. pierremgi

    How to make AI hold before trigger?

    Place a simple trigger. set fuel to 0 for the tank in editor . When your trigger is activated (server only, it'sbetter): tank1 setfuel 1;
  7. You need 2 triggers with area for presence (blufor present): - one immediate, say trg1, for the kill of the officer: In cond field: this && !alive officer1 - one delayed with a timeOut (check with 30 sec but works for 300), say tgr2 : in cond field : this add a 3rd trigger in cond. field : triggerActivated trg1 or triggerActivated trg2 link it to a task state module "succeeded" link the state module to the task module (created or assigned).
  8. pierremgi

    Respawn in new vehicle

    Read the last Seafood post. It works perfectly. You don't need any trigger. Just a workable "respawn_something" marker (or respawn module), the respawn attributes on "custom position", and the (_this select 0) in EH to be sure you're selecting the new player and not the corpse! just add the isServer condition: if (isServer) then {this addEventhandler ["respawn", {jet1 = createVehicle ["B_Plane_CAS_01_F", getMarkerPos "respawnmarker1", [], 1000, "FLY"]; (_this select 0) moveInDriver jet1}]}
  9. Don't write anything in description.ext for respawn. Just use the editor multiplayers menu. The mix of two is weird. Test furthermore: - 2 respawn points; - choice of the respawn position (editor menu).
  10. pierremgi

    Respawn in new vehicle

    Ah ok. In a player's init field, you must refer to this (global variable) not to _this, which is a local one, not acceptable in this context. But you can do: this spawn {_unit = _this; <any code with _unit>} . Not useful for an EH, but for any code with scheduled sequence like sleep, waitUntil...
  11. pierremgi

    Respawn in new vehicle

    Not exactly. EH passes default parameters. So, an array for _this, anyway.
  12. Your face must be declared in cfgFaces, referring to a file in an addon. Then, use setFace command in init field of the unit. RemoteExec it from server. Here is the example from BIKI page: if (isServer) then {[this, "AsianHead_A3_02"] remoteExec ["setFace", 0, this]};
  13. Mine is working quickly on any map (no need to have declared hill locations), any radius, without any repeated BIS function.
  14. Just math: MGI_elevatedCheck = compileFinal " _posHigh = _this select 0; _posTest = ATLtoASL _posHigh; _radius = _this select 1; if (_radius == worldSize) then { _posTest = ASLtoATL [worldSize/2,worldSize/2,0]; _radius = worldSize /2 }; _rangeSqr = MGI_range^2; _bestHigh = _posTest select 2; _n = (round _radius) min (worldSize / 10); _c = _radius / (sqrt (_n - 1)); for '_i' from _n to 0 step -1 do { _rho = _c * sqrt (_i + 0.5); _theta = 137.508 * (_i + 0.5); _ckPos = _posTest getPos [_rho,_theta]; call { if (_ckPos distanceSqr MGI_posRef > _rangeSqr) exitWith {}; if ((getTerrainHeightASL _ckPos) > _bestHigh) exitWith { _posHigh = ASLtoATL _ckPos; _bestHigh = getTerrainHeightASL _ckPos }; }; }; _posHigh "; MGI_HighestPt = { params [["_pos",[0,0,0]],["_range",worldSize]]; MGI_posRef = _pos; MGI_range = _range; _posHigh = [_pos,_range] call MGI_elevatedCheck; _posHigh = [_posHigh,_range /10] call MGI_elevatedCheck; _posHigh }; _highestPt = [<any position here>,<radius> (optional)] call MGI_HighestPt;
  15. pierremgi

    MP/PVP - Only one side is allowed to respawn

    My bad! thisList is updated. It's just the fact that a script in on act. is not a loop which leads to an instant picture of thisList. So you can use an updated thislist in a loop (on act. only) or through a "on act./on deact." process. Just a point: On my mind, there is no way to access thisList before the condition is met... It seems evident, but that makes difference with a deactivated (after activated) trigger.The script has it's own life even after the trigger's deactivation.
  16. pierremgi

    Multiplayer Animations

    Without any interest for multiplayer missions.
  17. pierremgi

    Deactivating Respawn Module

    disregard. No mean found.
  18. pierremgi

    Multiplayer Animations

    Yes, it's hard to make that in MP. And I guess there are more than a single problem to obtain what you want! Like you tried, you need to remoteExec a switchMove animation, because the effect is local, then only on player's PC (or server for an AI belonging to a group on server). First test a current animation, something like: if (local player) then {[player,"Acts_InjuredCoughRifle02"] remoteExec ["switchMove",0,true]}; // -2 for dedicated Second, test with your specific animation but I'm not sure the setdamage 1 will not override it (but if ok in SP...) Third, keep on mind the server/clients exchanges. I've been often disappointed with remote execution for some "heavy" sequences and switchmove doesn't help to do it light. There is no error.. but sometimes no animation if too busy. I hope you'll find more constructive help. The topic is interesting.
  19. pierremgi

    Detect if SEA is within an area

    Here is my 2 cent code. Just choose any position (on any map) and a radius (range) to be dry. MGI_dryCheck = compileFinal " _pos = _this select 0; _posWet = []; _range = _this select 1; _deltaR = _range / 3600; for '_i' from 0 to 3600 step 10 do { _ckPos = _pos getPos [_deltaR*_i,_i]; if (surfaceIsWater _ckPos) exitWith {_posWet = _ckPos} }; _posWet "; MGI_wetCheck = compileFinal " _pos = _this select 0; _posDry = []; _range = _this select 1; _deltaR = _range / 3600; for '_i' from 0 to 3600 step 10 do { _ckPos = _pos getPos [_deltaR*_i,_i]; if !(surfaceIsWater _ckPos) exitWith {_posDry = _ckPos} }; _posDry "; MGI_dryArea = { _pos0 = _this select 0; _range = _this select 1; _pos = _pos0; _cnt = 0; if (surfaceIsWater _pos0) then { _posDry = [_pos,_range] call MGI_wetCheck; while {(_posDry isEqualTo [])} do { _pos = _pos vectorAdd ((_pos vectorFromTo [worldSize/2,worldSize/2,0]) vectorMultiply _range); _posDry = [_pos,_range] call MGI_wetCheck; }; _pos0 = _posDry; _pos = _pos0; }; _posWet = [_pos,_range] call MGI_dryCheck; while {!(_posWet isEqualTo [])} do { _cnt = _cnt + 1; _pos = _pos vectorAdd ((_poswet vectorFromTo _pos) vectorMultiply (_range - (_pos distance _posWet))); _posWet = [_pos,_range] call MGI_dryCheck; if (_cnt == 20) exitWith { _range = _range * 0.66; [_pos0,_range] call MGI_dryArea; }; }; deleteMarker "dry drop"; _mk = createMarker ["dry drop",_pos]; _mk setMarkerShape "ellipse"; _mk setMarkerSize [_range max 50,_range max 50] }; [any position,range] call MGI_dryArea; How it works: first checking if in water or on ground; spiraling for touching any ground if water only, close the ground in direction of the center of the map, for a distance equal to the range you chose; check if any ground by spiraling; .... reaching a ground, check for shore by spiraling, if any shore, move away to opposite direction for range - distance to shore, check if any shore in a 20 round loop, if no more shore, tada, you've got the exact dry area with range radius. if no joy, shrink the radius to 0.66 of the former one and test again. (you are in a tiny island with a too big radius) Performances are not too bad. Hope this help.
  20. Place the code in init.sqf to be run in initPlayerLocal.sqf. You can do what you need in initplayerLocal.sqf, so disregard the init field of the unit. On the other hand, if you like to work with the init field of the units, as the code runs on each JIP, you have to wait for the player to be local (on player's PC) and target this player only. In the units init field, write something like: 0 = this spawn { waitUntil {sleep 0.5; isPlayer _this && local _this}; [this] execVM "loadouts\Blu_gear.sqf"}; I repeat you can execVm, directly in initplayerLocal.sqf, instead.
  21. pierremgi

    Support Requester Help

    Yep, I did that for radio backpack :
  22. If (!local _object && !(_object isKindOf "CAManBase")) then {...};
  23. pierremgi

    Detect if SEA is within an area

    surfaceIsWater someposition;
×