Jump to content

pierremgi

Member
  • Content Count

    7273
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by pierremgi

  1. pierremgi

    AI Air dynamic CAS

    [_plane] spawn {sleep 29;while {true} do {[_this select 0, "CUP_Vmlauncher_S5_veh"] call BIS_fnc_fire;sleep 0.02}}; [_plane] spawn {sleep 28;while {true} do {[_this select 0, "CUP_Vacannon_GSh23L_L39"] call BIS_fnc_fire;sleep 0.05}}; while {true}? really? Two never ending spawned scripts for firing a target! ... with a railed plane by setVelocity huge array, instead of waypoint! Well... Ii's a long road to script a workable CAS. Sorry I can't help with your choices. You can save a huge time using the @beno_83au code.
  2. Well... I don't have any problem making FIA_GORGON1 with your script (uploaded pastebin). I just replaced your trigger by a radio Alpha, repeatable one. Verify the position and area of yours... I will not surprised if you delete/re-add the same trigger, with the same code to make it work. Check also the distance of the logics. I placed them at ~ 200m from Gorgon, on Tanoa airfield.
  3. First remove the itemMap from the player's loadout (Editor) Second, add it in initPlayerLocal.sqf: waitUntil {!visibleMap}; player linkIItem "itemMap"; Then, here is a script opening map on origin. You can replace [0,0,0] by any position you want and add a variable to enable/disable this script: instead of while {true} for example: while {!("ItemGPS" in assigneditems player)} 0 = [] spawn { while {true} do { waitUntil {visibleMap}; (findDisplay 12 displayCtrl 51) ctrlMapAnimAdd [0, 0.05, [0,0,0]]; ctrlMapAnimCommit (findDisplay 12 displayCtrl 51); waitUntil {!visibleMap}; }; };
  4. pierremgi

    Air Veh Radar Hud Remove?

    You need to set to false the first and third booleans in showHUD [false,true,false,false,true,true,true,true];
  5. Your trigger uses bis_fnc_fire. Arma v1.73 ... with some hints in BIKI. Try something else, like fireAtTarget . See the board in BIKI.
  6. Try to do the same in a new mission. Vehicle, targets, codes, (triggers). Just that. Sometimes, it's just a question of mess in entities/attributes mission.sqm. If Ok, I 'm afraid you can replace all your afferent objects/codes in your old mission. Another cause could be a too heavy code preempting the scheduler slot (3ms), depending on how did you load the bark for your scenario.
  7. If SP , where you want. If MP, in initServerLocal.sqf: yourOfficer setpos ( selectRandom (nearestBuilding yourOfficer buildingPos -1)); // if your unit is named yourOfficer or in init field of the officer like this: if (isServer) then {this setPos (selectRandom (nearestBuilding this buildingPos -1))}; Make sure you choose a building with positions (generally with doors and/or ladders). Tanoa has plenty of poorly implemented buildings. If you need something more precise without predefined positions, you can place your officer in 3den, then right click on it / log / log position to clipboard. You can build your array of positions arrays this way, and selectRandom it, instead of the buildingPos.
  8. yourOfficer setpos (selectRandom (yourBuilding buildingPos -1)); If yourBuilding is a map object, you can use nearestBuilding yourOfficer instead, or nearestTerrainObjects type "house". See BIKI.
  9. pierremgi

    Grabbing Waypoints

    Not sure to understand... If you copy/paste a whole area, you will catch waypoints also. If I'm right, the composition is fine to reproduce a camp or a base, with units... somewhere else. So your waypoints need to be relative, not absolute. Right? The best way to do this remains a script adding waypoints once the composition is spawned. You can even randomize a patrol.
  10. pierremgi

    Threat proximity sensor

    Take some vacations. Have a break! https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#IncomingMissile
  11. pierremgi

    other option for setDir

    See also: https://community.bistudio.com/wiki/eyeDirection https://community.bistudio.com/wiki/getCameraViewDirection https://community.bistudio.com/wiki/weaponDirection If you need some dir & up return value: https://community.bistudio.com/wiki/BIS_fnc_vectorDirAndUpRelative (between two objects) or use fnc_setPitchBankYaw with an object + vector
  12. pierremgi

    eliminate only the driver

    Next time, open a new thread if you don't find any solution in this forum. Titles are references for future readers. See bis_fnc_spawnGroup
  13. in initServer.sqf, at the end of this script: waitUntil {sleep 1; {side _x == civilian} count allPlayers >1}; // waiting for 2 players as civilian _shooter = selectRandom [civ1, civ2]; [_shooter, [ "<t color='#C00000'>BEGIN CARNAGE</t>", { params ["_plyr","_tgt","_id"]; _plyr execVM "shooter.sqf"; _plyr removeAction _id; }, [], 1.5, true, false, "", "true", 0.1, false, "", "" ] ] remoteExec ["addaction",_shooter]; shooter.sqf: params ["_plyr"]; hint "bla bla"; [_plyr, ["pumped", 25, 1] ] remoteExec ["say3D"]; _grp = createGroup East; [_plyr] joinSilent _grp;
  14. No need for an addon: in init field of the unit: this addEventHandler ["handledamage", { if ((_this select 1) == "head" && headgear (_this select 0) != "") exitWith { _h = headgear (_this select 0); removeHeadgear (_this select 0); _g = goggles (_this select 0); removeGoggles (_this select 0); _nv = ((assignedItems (_this select 0)) select {_x find "NV" > -1}) select 0; (_this select 0) unlinkItem _nv; _w = createVehicle ["WeaponHolderSimulated_scripted",ASLtoATL eyePos (_this select 0),[],0,"CAN_COLLIDE"]; _w addItemCargoGlobal [_h,1]; _w addItemCargoGlobal [_g,1]; _w addItemCargoGlobal [_nv,1]; _w setVelocity [5 * sin ((_this select 3) getdir (_this select 0)), 5 * cos ((_this select 3) getDir (_this select 0)), 0.3]; _w addTorque [random 0.02, random .02, random .02]; 0 } }];
  15. The sooner as possible. Try a trigger set to true. But frankly, use the module instead!
  16. pierremgi

    SetGroupID problem

    When you disable AI in lobby, the AI has no existence (no variable name for example) before a player jumps into the slot. Don't ask me how Arma's engine manage that. The sure things are that if you name an AI: bob , bob will not be defined anywhere before JIP. More than this, playableUnits will not take into account the disabled slots. That's questionable, but that doesn't matter for BI devs. So, I'm not sure your disable slot / JIP will belong to his group and run the group's init code in the good order. (I'm rather sure the problem comes from here).
  17. pierremgi

    Reloading T-140K Angara

    No need to know the specific ammo. In init field of the vehicle: the "perfect cheat code": this addEventHandler ["Fired", { params ["_unit"]; _unit setVehicleAmmoDef 1 }]; Smarter one, but not perfect: this addEventHandler ["Fired", { params ["_veh", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; if (count (assignedVehicleRole _gunner) > 1 && _veh == objectParent _gunner) then { _ass = assignedVehicleRole _gunner select 1; _mag = _veh currentMagazineTurret _ass; _strLength = _mag find "Rnd"; _count = parsenumber (_mag select [0,_strLength]); { if ( magazinesAmmo _veh select _forEachIndex select 1 == 1) exitWith { _veh removeMagazineTurret [_mag,_ass]; _veh addMagazineTurret [_magazine,_ass,_count]; } } forEach magazinesAmmo _veh; }; }];
  18. - I don't know what shooter is, here, but that must be an object/unit, edited and named shooter. So, any player will see the addAction... NB: If you spawn your shooter while in game, on server, you'll need to remoteExec your addAction (only server will knows this variable name) - You can choose any player by: selectRandom allPlayers You will select an existing player, no matter if all slots are played or not. - To change loadout, first you have to register a loadout (export from arsenal for example, or use getUnitLoadout), then use the setUnitLoadout when needed. - Play the sound file: depending on who have to hear that. remoteExec it if needed. See BIKI. You need to remoteExec the removeAction. If not you will remove it locally only.
  19. pierremgi

    Kill Diferent Side

    Your approach is not right. For example, if a civilian is killed, you have a 2 pt penalization, no matter the killing side. ... And it's difficult to understand your logic with if (side player == WEST && player iskindof "Man") then ... (I never saw a player not a "man"... except a script for a dog somewhere). It seems you need a custom score. It's easy to do. - You're right in initialization of your variable and publicVariable them, but do it from initServer.sqf. If in init.sqf, any JIP will reset your variables! - use a single mission event hanlder (MEH) in init.sqf (here you need to run it on each local PC connecting): addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if (isNull _instigator) then {_instigator = UAVControl vehicle _killer select 0}; // UAV/UGV player operated road kill if (isNull _instigator) then {_instigator = _killer}; // player driven vehicle road kill hint format ["Killed By %1", name _instigator]; // or what ever code here }]; - you need to catch the side of the killed unit (as you know a dead is civilian). Two ways: * write for the side of the group. Example: side group _killed == west ... as a dead doesn't leave his group instantaneously), but 100% reliable? I don't know. (a dead falls to nullGrp when other units are aware of the kill) * or grab the side of your unit by Bis_fnc_Objectside . Not reliable if you changed the side of a unit (refers to the type of the object) - As you did, don't forget to publicVariable your scores each time they change! Now, you should write all cases and intended scores.
  20. pierremgi

    getin eventhandler

    Any other mod... using inGameUISetEventHandler (usually for overriding an action menu). You have to test and make some choices if that occurs.
  21. Your script works without loop, for a specific area (a trigger for example, not an updated player's position)! It's the same as the BI module function. You just have to wait for the initialization order. So, if your vehicle is already inside a bunch of rocks, with a waypoint, you will see the vehicle stuck or it'll climb on hidden rock. But if you pass through these rocks after mission start, that will work (like the module). Simple as that.
  22. "this is happening with and without mods" but probably with a running script, in a trigger or a waypoint completed. Or not enough seats in vehicle. Check these ways. See also: https://forums.bohemia.net/forums/topic/217536-ai-soldiers-keep-leaving-helicopters/?tab=comments#comment-3299235 https://forums.bohemia.net/forums/topic/206639-ai-commander-orders-to-disembark-whith-no-reason/?tab=comments#comment-3210212
  23. pierremgi

    SetGroupID problem

    - Are you sure you're in the attributes of the group, not the leader (composition init , not object init) ? - You should try the call sign field of the group attributes. Did you disable AI in lobby?
  24. As already mentioned: - (by EO) the module acts on: * ["TREE","SMALL TREE","BUSH"] for vegetation * ["ROCK","ROCKS","FOREST BORDER","FOREST TRIANGLE","FOREST SQUARE","CROSS","FORTRESS","FOUNTAIN","VIEW-TOWER","LIGHTHOUSE","QUAY","HIDE","BUSSTOP","ROAD","FOREST","TRANSMITTER","STACK","TOURISM","WATERTOWER","TRACK","MAIN ROAD","POWER LINES","RAILWAY","POWERSOLAR","POWERWAVE","POWERWIND","SHIPWRECK","TRAIL"] for miscellaneous; NB: usually "HIDE" is a weird but efficient tool - any global command should run on server only.
×