Jump to content

pierremgi

Member
  • Content Count

    7431
  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

4879 Excellent

About pierremgi

  • Rank
    Major

Profile Information

  • Location
    Tahiti

Recent Profile Visitors

23945 profile views
  1. _mg doSuppressiveFire (getposASL player vectorAdd [((1 + random 1) + (-1 + random -1)), ((1 + random 1) + (-1 + random -1)), (2 + random 2)]);..... or _mg doSuppressiveFire (getposASL player vectorAdd [-1 + random 2, -1 + random 2, (2 + random 2)]); (same 😋) 1+ 0...1 means 1...2 -1 + -1...0 means -2... -1 1...2 + -2... -1 means -1 ... 1, same as -1 + 0...2
  2. Example: place in init field of the gunner (here a MK30 HMG). Make sure your player is prone at start! this spawn { while {true} do { sleep 2; _this doSuppressiveFire (getposASL player vectorAdd [0,0,1]); _this suppressFor 10; _this setVehicleAmmo 1; sleep 10; }; }; Feel free to trigger it as you need. doSuppressiveFire works in ASL position. The vectorAdd can set an altitude (z) above the player's feet. setVehicleAmmo is for turret. For heavy gunner, use setAmmo instead (the syntax is different)
  3. pierremgi

    Multiplayer tasks

    It's hard to say what occurs in your scenario. The fact is there are plenty of reasons for missing something. As example: - triggers must be triggered by due conditions and synced to modules (create task to make it appear in diary, setTaskState for modifying its status...). - all createTask modules must be synced to players, group leaders (or not if you choose a side). If you are not among the owners of the task, you will neither see it and nor notification. - task can be delayed (so hidden) if synced to one trigger (no more). When activated, the task appears with the status you decided.... or the status of setTaskState synced to its own trigger and the task. If sometimes, the notification doesn't show, the first thing to do is to schedule what happens by triggers (all) and avoid too many events at the same time. (triggers can be delayed, especially for task notification on completion).
  4. pierremgi

    Multiplayer tasks

    For MP edited scenario, don't forget the dynamic simulation. A common error is to fill up the map with enemies, as you could spawn them via scripts. The BI spawn system by modules is not really powerful. The dynamic simulation can help. If you're not afraid by mods (mandatory for all players) you could have a look at my modules (so no script). I have done them for make the edited scenario far easier.
  5. You can use simple global variable: isShooting = false; { _x addEventHandler ["Fired", { isShooting = TRUE }]; } forEach _teamVeh; Perhaps I missed something.
  6. pierremgi

    Multiplayer tasks

    Yes. For example, I'm using: BIS_fnc_setTask BIS_fnc_taskSetState BIS_fnc_taskState See also Arma_3:_Task_Framework (you'll find a tutorial) That looks like (part of script): Now, if you don't want to script, your MP scenario will be basic. Place task modules and triggers for revealing tasks, making them succeeded or failed or canceled... Choose for hosted or dedicated server (harder) Test your scenario with JIP. As you need, at least, to set some conditions and that's little codes, you should have a look at: Locality Multiplayer_Scripting and perhaps some other Arma_Scripting_Tutorials
  7. pierremgi

    Multiplayer tasks

    Nice to read you @EricJ , and thanks for your well-known mods about Taliban fighters. It seems to me the MP issues are gone for a while on task modules. Usually, edited tasks are revealed/assigned/completed... by edited triggers and this could be tricky to manage, especially if you need specific tasks for specific players. The scripted tasks are probably easier to set for due players at due time but the syntax is not really simple and you need to script your scenario. If you have more details about your project, what you did, and what you would like to fix...
  8. pierremgi

    XM7 rifle

    So, perhaps, you just have to call your silencer script just before : _unit setVariable ["UnitData", _unitData]; and that's all.
  9. You can apply: thisCar addEventHandler ["Fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; }]; Here _unit is already the vehicle. No need for vehicle _unit (which also returns the same vehicle). You can use _gunner for the _unit who shot, but that doesn't work for passengers. The reason why there is another EH: { _x addEventHandler ["FiredMan", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle"]; }] } forEach crew thisCar;
  10. pierremgi

    XM7 rifle

    In SP, there is no respawn. I duno what you wrote for that. Mine (SP Simple Respawn module) makes the player fall unconscious, then aware (+ some options). So, your unit remains unchanged and you don't need anything to re-run. For AIs, I wrote some other modules in this case, and yes, I re-create same unit as the one who died. I manage this "SP respawn" system (MP also) with options same loadout as at start / same loadout as in death. I'm using get/setUnitLoadout commands for that. You just have to get the loadout once the silence is added, for example. Anyway, your script is working..., even for Vanilla BLUFOR equipped with any MX rifle.
  11. OK, approaching the real life... but little bit laggy (for me) The steam is not visible while the deflector is down; as soon as the deflector rises, the steam appears; the deflector is retracted; 30 sec sleep; The steam disappear; the steam is visible as soon as the deflector rises again.... and so on. private _shuttle1 = allMissionObjects "Land_Carrier_01_hull_04_2_F" #0; private _shuttle2 = allMissionObjects "Land_Carrier_01_hull_04_1_F" #0; private _shuttle3 = allMissionObjects "Land_Carrier_01_hull_07_1_F" #0; private _shuttle4 = allMissionObjects "Land_Carrier_01_hull_07_1_F" #0; _shuttle1 spawn { params ["_shuttle1"]; private _partArray1 = []; while {TRUE} do { waitUntil {sleep 0.5; _shuttle1 animationPhase "deflector_1" > 0}; private "_ps1"; for "_i" from 0 to 116 do { _ps1 = "#particlesource" createVehicleLocal (_shuttle1 modelToWorldVisual [3+_i/10.2,-3-_i,18.5]); _ps1 setParticleParams [ ["\A3\Data_F\ParticleEffects\Universal\Universal",16,9,16,1], "", "Billboard", 0,2,[0,0,0],[0,0,0.0001],0,1.28,1,1,[0.4,0.8,0.2], [[1,1,1,0.05],[1,1,1,0.25],[1,1,1,0.05],[1,1,1,0.225],[1,1,1,0.05]], [0],0.5,0.2,"","", _ps1 ]; _ps1 setParticleRandom [0.5,[0.1,0.1,0.1],[1,1,1],0.2,0.3,[0,0,0,0],0,0,45,0]; _ps1 setDropInterval 0.1; _partArray1 pushBack _ps1; }; waitUntil {sleep 0.5; _shuttle1 animationPhase "deflector_1" == 0}; sleep 30; {deleteVehicle _x} count _partArray1; }; }; _shuttle2 spawn { params ["_shuttle2"]; private _partArray2 = []; while {TRUE} do { waitUntil {sleep 0.5; _shuttle2 animationPhase "deflector_2" > 0}; private "_ps2"; for "_i" from 0 to 116 do { _ps2 = "#particlesource" createVehicleLocal (_shuttle2 modelToWorldVisual [-18.3+_i/34,-3-_i,18.5]); _ps2 setParticleParams [ ["\A3\Data_F\ParticleEffects\Universal\Universal",16,9,16,1], "", "Billboard", 0,2,[0,0,0],[0,0,0.0001],0,1.28,1,1,[0.4,0.8,0.2], [[1,1,1,0.05],[1,1,1,0.25],[1,1,1,0.05],[1,1,1,0.225],[1,1,1,0.05]], [0],0.5,0.2,"","", _ps2 ]; _ps2 setParticleRandom [0.5,[0.1,0.1,0.1],[1,1,1],0.2,0.3,[0,0,0,0],0,0,45,0]; _ps2 setDropInterval 0.1; _partArray2 pushBack _ps2; }; waitUntil {sleep 0.5; _shuttle2 animationPhase "deflector_2" == 0}; sleep 30; {deleteVehicle _x} count _partArray2; }; }; _shuttle3 spawn { params ["_shuttle3"]; private _partArray3 = []; while {TRUE} do { waitUntil {sleep 0.5; _shuttle3 animationPhase "deflector_3" > 0}; private "_ps3"; for "_i" from 0 to 116 do { _ps3 = "#particlesource" createVehicleLocal (_shuttle3 modelToWorldVisual [-2.6+_i/16,-37.3-_i,18.5]); _ps3 setParticleParams [ ["\A3\Data_F\ParticleEffects\Universal\Universal",16,9,16,1], "", "Billboard", 0,2,[0,0,0],[0,0,0.0001],0,1.28,1,1,[0.4,0.8,0.2], [[1,1,1,0.05],[1,1,1,0.25],[1,1,1,0.05],[1,1,1,0.225],[1,1,1,0.05]], [0],0.5,0.2,"","", _ps3 ]; _ps3 setParticleRandom [0.5,[0.1,0.1,0.1],[1,1,1],0.2,0.3,[0,0,0,0],0,0,45,0]; _ps3 setDropInterval 0.1; _partArray3 pushBack _ps3; }; waitUntil {sleep 0.5; _shuttle3 animationPhase "deflector_3" == 0}; sleep 30; {deleteVehicle _x} count _partArray3; }; }; _shuttle4 spawn { params ["_shuttle4"]; private _partArray4 = []; while {TRUE} do { waitUntil {sleep 0.5; _shuttle4 animationPhase "deflector_4" > 0}; private "_ps4"; for "_i" from 0 to 116 do { _ps4 = "#particlesource" createVehicleLocal (_shuttle4 modelToWorldVisual [12.7,-17-_i,18.5]); _ps4 setParticleParams [ ["\A3\Data_F\ParticleEffects\Universal\Universal",16,9,16,1], "", "Billboard", 0,2,[0,0,0],[0,0,0.0001],0,1.28,1,1,[0.4,0.8,0.2], [[1,1,1,0.05],[1,1,1,0.25],[1,1,1,0.05],[1,1,1,0.225],[1,1,1,0.05]], [0],0.5,0.2,"","", _ps4 ]; _ps4 setParticleRandom [0.5,[0.1,0.1,0.1],[1,1,1],0.2,0.3,[0,0,0,0],0,0,45,0]; _ps4 setDropInterval 0.1; _partArray4 pushBack _ps4; }; waitUntil {sleep 0.5; _shuttle4 animationPhase "deflector_4" == 0}; sleep 30; {deleteVehicle _x} count _partArray4; }; }; Don't forget the wind on deck for better effect. Steam subject also to vortex of helo rotor...
  12. That doesn't matter. Your preset condition "Any" "present" will be true everywhere the trigger is known (server + client or server only). So, the code will run... and: - if on server only, you may have to remote execute some commands (depending on locality for arguments or effects). For example spawning a vehicle (via createVehicle) is straight (no remote execution) because the command is GE. On the other hand, a command like playSound , which is LE, needs to be remote executed for clients (players). I can't say for your NUP_fnc_repairVehicle functions, because I don't know which commands are involved here. If just a setDamage, no need for remote execution, the command is GA GE! But I guess there are other commands like hint (LE) or else. - if for everyone, (not server only) , the code will run everywhere. The reason why sometimes people ask why there are so many vehicles spawned at the same place, even without any remote execution. This option is fine for running code everywhere (without useless broadcast), but may cause other issues. Remark: - For edited triggers, you can choose between server only / or not, options. - For scripted triggers, you can script where you need (server, some clients, all clients, server + clients), and you can decide if the trigger is "local" or "global" (in confusing term of makeGlobal true or false) this option (see createTrigger syntax) has no sense in editor, but makes sense in script, especially in MP scenario. See this post: Two questions: 1 Where your trigger is written ( server script, initPlayerLocal.sqf... ?) 2 what your NUP_fnc_repairVehicle is made of (code)?
  13. pierremgi

    Help with script

    [ Package, "Grab the package", "\a3\ui_f\data\IGUI\Cfg\actions\take_ca.paa", "\a3\ui_f\data\IGUI\Cfg\actions\take_ca.paa", "_this distance _target < 2 && {isNull attachedTo _target}", "_caller distance _target < 2 && {isNull attachedTo _target}", {}, {}, { Package attachTo [_caller,[-0.23,-0.16,0],"Spine3",true]; [ player, "Drop the package", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "Package in attachedObjects _this", "Package in attachedObjects _caller", {}, {}, {detach Package}, {}, [], 3, 1, true, false ] call BIS_fnc_holdActionAdd; }, {}, [], 3, 1, false, false ] call BIS_fnc_holdActionAdd; addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if (Package in attachedObjects _killed) then { detach Package}; }]; Not deeply tested.
  14. pierremgi

    XM7 rifle

    EntityCreated EH fires for multiple useless "entities" like rabbit or flies, but also foot prints and so on. So, a decent use of it implies to start by something like: if (_entity isKindOf "CaManBase") then {.... your code }; If you script such code for players only: in initPlayerLocal.sqf: your_fnc_holySilencer = {... }; player call your_fnc_holySilencer; addMissionEventHandler ["entityRespawned", {(_this #0) call your_fnc_holySilencer}];
  15. pierremgi

    XM7 rifle

    This reminds me that I created a module "adapt silencers" for stealth/combat simulation, so AIs automatically mount or dismount the silencer on weapon, depending on the combat status. Just checked, that works with new Expeditionary Forces DLC.
×