Mr Sovic 0 Posted August 24, 2019 Hello. In my mission I want players to get eject from the plane when it reaches the trigger. In my trigger activation, I have: [planeBoii] spawn Sov_fnc_PlaneLineDrop; the function here works great on SP. I've tried remoteExec and it still doesn't work on clients. _yourvehicle = _this Select 0; _passengers = []; _crew = crew _yourvehicle; _dir = direction _yourvehicle; //Get everyone except the crew. { _isCrew = assignedVehicleRole _x; if(count _isCrew > 0) then { if((_isCrew select 0) == "Cargo") then { _passengers pushback _x }; }; } foreach [_crew,playableUnits,switchableUnits]; _yourvehicle say3D ["Sov_missile_hit",500,2,false]; sleep 2.9; _PS1 = "#particlesource" createVehicleLocal (getpos _yourvehicle); _PS1 setParticleCircle [0, [0, 0, 0]]; _PS1 setParticleRandom [0.2, [1, 1, 0], [0.5, 0.5, 0], 1, 0.5, [0, 0, 0, 0], 0, 0]; _PS1 setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 2, 6], "", "Billboard", 1, 1, [0, 0, 0], [0, 0, 0.5], 1, 1, 0.9, 0.3, [1.5], [[1, 0.7, 0.7, 0.5]], [1], 0, 0, "", "", _yourvehicle]; _PS1 setDropInterval 0.03; _PS2 = "#particlesource" createVehicleLocal (getpos _yourvehicle); _PS2 setParticleCircle [0, [0, 0, 0]]; _PS2 setParticleRandom [0, [0, 0, 0], [0.33, 0.33, 0], 0, 0.25, [0.05, 0.05, 0.05, 0.05], 0, 0]; _PS2 setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 0, 1], "", "Billboard", 1, 10, [0, 0, 0.5], [0, 0, 2.9], 1, 1.275, 1, 0.066, [4, 5, 10, 10], [[0.3, 0.3, 0.3, 0.33], [0.4, 0.4, 0.4, 0.33], [0.2, 0.2, 0, 0]], [0, 1], 1, 0, "", "", _yourvehicle]; _PS2 setDropInterval 0.5; _PS3 = "#particlesource" createVehicleLocal (getpos _yourvehicle); _PS3 setParticleCircle [0, [0, 0, 0]]; _PS3 setParticleRandom [0, [0, 0, 0], [0.5, 0.5, 0], 0, 0.25, [0.05, 0.05, 0.05, 0.05], 0, 0]; _PS3 setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 3, 1], "", "Billboard", 1, 15, [0, 0, 0.5], [0, 0, 2.9], 1, 1.275, 1, 0.066, [4, 5, 10, 10], [[0.1, 0.1, 0.1, 0.75], [0.4, 0.4, 0.4, 0.5], [1, 1, 1, 0.2]], [0], 1, 0, "", "", _yourvehicle]; _PS3 setDropInterval 0.25; _PS1 attachTo [_yourvehicle]; _PS2 attachTo [_yourvehicle]; _PS3 attachTo [_yourvehicle]; _yourvehicle say3D ["Sov_Plane_fall",500,1,false]; //Now moveout only passengers leaving the crew inside. { _x disableCollisionWith _yourvehicle; _x allowdamage false; unassignvehicle _x; moveout _x; _x addBackpack "B_Parachute"; _x setDir (_dir + 90); sleep 0.7; _x allowdamage true; } forEach _passengers; But when I test with mates on a server it seems to not to want to work. passes up no error. Share this post Link to post Share on other sites
gc8 970 Posted August 24, 2019 55 minutes ago, Mr Sovic said: } foreach [_crew,playableUnits,switchableUnits]; I don't see how this is going to work. it should be: } foreach (_crew + playableUnits + switchableUnits); But if you want to eject players only from one plane why not just use _crew? 1 Share this post Link to post Share on other sites
Mr Sovic 0 Posted August 24, 2019 1 hour ago, gc8 said: I don't see how this is going to work. it should be: } foreach (_crew + playableUnits + switchableUnits); But if you want to eject players only from one plane why not just use _crew? I did use just _crew before. the reason I have it like that was to figure out why the script doesn't work in MP Share this post Link to post Share on other sites
gc8 970 Posted August 24, 2019 8 minutes ago, Mr Sovic said: I did use just _crew before. the reason I have it like that was to figure out why the script doesn't work in MP Only thing I can think of is if the player is manning a turret then he's not considered as "Cargo". But assignedVehicleRole will return "Turret" for him 1 Share this post Link to post Share on other sites
Mr Sovic 0 Posted August 24, 2019 2 minutes ago, gc8 said: Only thing I can think of is if the player is manning a turret then he's not considered as "Cargo". But assignedVehicleRole will return "Turret" for him I just tested this with AI. the AI does exactly what the script is meant to do. players are the only ones this script doesn't register for. What alternatives would recommend? Share this post Link to post Share on other sites
gc8 970 Posted August 24, 2019 Like I said, make sure the players aren't in turrets (manning guns or whatever) You could also make a loop that simply gets all the players, irregardless where the player is in the vehicle: { if(isPlayer _x) then { _passengers pushback _x; }; } foreach _crew; Share this post Link to post Share on other sites
Mr Sovic 0 Posted August 24, 2019 6 minutes ago, gc8 said: Like I said, make sure the players aren't in turrets (manning guns or whatever) You could also make a loop that simply gets all the players, irregardless where the player is in the vehicle: { if(isPlayer _x) then { _passengers pushback _x; }; } foreach _crew; I am going to try this out. The plane I use is from RHS, the C-130j. players aren't in turrets position Share this post Link to post Share on other sites
Mr Sovic 0 Posted August 25, 2019 Update. No luck so far. 😞 Share this post Link to post Share on other sites
engima 327 Posted August 25, 2019 I think it is a locality issue. The last piece of code that has the units do the jump out I’d guess need to be executed on each player’s machines. I’m not sure exactly which of the commands, but moveOut and addBackpack (and maybe more of them). Create a function for the jump out that takes a player unit as an argument, and make sure it is called on each player’s machine respectively. Share this post Link to post Share on other sites
gc8 970 Posted August 25, 2019 2 hours ago, engima said: I think it is a locality issue. According to wiki it does not matter where you call moveout. Share this post Link to post Share on other sites
engima 327 Posted August 25, 2019 That’s possible. But what about the other commands? A good practice I would say, is to always deal with the player on its local machine. So I would still go for locality. Share this post Link to post Share on other sites
Mr Sovic 0 Posted August 26, 2019 so what if I set up the script to remoteExec on each machine? also, how would I go about this? Share this post Link to post Share on other sites
gc8 970 Posted August 26, 2019 49 minutes ago, Mr Sovic said: so what if I set up the script to remoteExec on each machine? also, how would I go about this? If I were you I'd first place a diag_log in the beginning of the script to make sure the script is actually run in multiplayer. It maybe you have some if condition there so that the script is only run in single player 1 Share this post Link to post Share on other sites
Mr Sovic 0 Posted August 26, 2019 2 16 minutes ago, gc8 said: If I were you I'd first place a diag_log in the beginning of the script to make sure the script is actually run in multiplayer. It maybe you have some if condition there so that the script is only run in single player How would I go about using diag_log? I have never used it before. Share this post Link to post Share on other sites
gc8 970 Posted August 26, 2019 @Mr Sovic diag_log "Script running"; Would write that string to arma .rpt file. Either to dedicated server dir or to arma user dir 1 Share this post Link to post Share on other sites