JohnKalo 657 Posted August 3, 2017 In one of my missions I need the squad to be transferred via a Panther to a location. I want them however to be able to get in the Panther as passengers only because if they get in the commander or driver position the Panther's waypoints go crazy. So I have inserted this in the Panther's init: tran0 lockTurret [[0,0], true]; tran0 lockDriver true; And it worked! In the editor... When we tested our misison in an mp server it didn't. Players could get in the Panther as passengers, driver or commander. Sooo what am I doing wrong? Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted August 3, 2017 Typical MP locality issue, execute the commands where the vehicle is local, like this: [tran0,[[0,0],true]] remoteExec ["lockTurret",tran0]; [tran0,true] remoteExec ["lockDriver",tran0]; Cheers Share this post Link to post Share on other sites
JohnKalo 657 Posted August 3, 2017 Same thing. Just tested it. It works in the editor but not in a server Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted August 3, 2017 Are you running any mods? Cheers Share this post Link to post Share on other sites
JohnKalo 657 Posted August 3, 2017 CBA ASR AI3 Advanced Rappelling Advanced Urban Rappelling Kunduz, Afghanistan Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted August 3, 2017 Try it without mods and see if it's the same result. Cheers Share this post Link to post Share on other sites
JohnKalo 657 Posted August 3, 2017 GOSH!!!! I can't!!! Our missions seem to need CBA as well as ASR AI3! Anyways the problem still remains Share this post Link to post Share on other sites
sarogahtyp 1108 Posted August 7, 2017 Turrets are local to the machine of the one who is in it. Idk if turrets are really local to the drivers machine or to server if turrets are empty. It should work for sure if u execute the lock command on all clientssent from mobile using Tapatalk Share this post Link to post Share on other sites
scheintot2 12 Posted August 7, 2017 A vehicle is always local to the client of its driver https://community.bistudio.com/wiki/Locality_in_Multiplayer Now you know. It should work if you execute the code where the vehicle is local. If not, do what sarogahtyp has written down the corner. Share this post Link to post Share on other sites
pierremgi 4897 Posted August 7, 2017 in init.sqf (or initPlayerLocal.sqf) inGameUISetEventHandler ["Action", " if ((_this select 0) == tran0) then { if ((_this select 3) in ['GetInDriver','GetInPilot','GetInCommander','GetInTurret','MoveToDriver','MoveToCommander','MoveToTurret','MoveToPilot']) exitWith { hint parseText ('<t>Jump in cargo seats<t/>'); true }; }; "]; 1 Share this post Link to post Share on other sites
scheintot2 12 Posted August 7, 2017 inGameUISetEventHandler ["Action", " if ((_this select 0) == tran0) then { // From init, checking if unit is tran0 if ((_this select 3) in ['GetInDriver','GetInPilot','GetInCommander','GetInTurret','MoveToDriver','MoveToCommander','MoveToTurret','MoveToPilot']) // Check if the actual action which got added to the unit is in this array and exit with hint// exitWith { hint parseText ('<t>Jump in cargo seats<t/>'); true }; }; "]; Help me to understand. I do not understand '_this select 3' because this is just the index of the given action to the object the EH got attached to. Share this post Link to post Share on other sites
sarogahtyp 1108 Posted August 7, 2017 3 hours ago, scheintot2 said: A vehicle is always local to the client of its driver https://community.bistudio.com/wiki/Locality_in_Multiplayer Now you know. It should work if you execute the code where the vehicle is local. If not, do what sarogahtyp has written down the corner. Now YOU know: Quote Some info on turrets: A vehicle turret will change locality when player gunner gets in it, just like vehicle changes locality when player driver gets in it. Many commands for turrets work only where turret is local. When gunner leaves turret it is supposed to change locality to the locality of the vehicle. A vehicle can have one owner while turrets have different owners. https://community.bistudio.com/wiki/turretOwner but the wiki entry of lockTurret describes that the command has to be executed where the vehicle is local. Therefore the locality of the turret shouldn't matter and Grumpy's solution should work. But if it doesn't then I would try [tran0,[[0,0],true]] remoteExec ["lockTurret",(tran0 turretOwner [0,0])]; [tran0,true] remoteExec ["lockDriver",tran0]; Share this post Link to post Share on other sites
pierremgi 4897 Posted August 7, 2017 6 hours ago, scheintot2 said: inGameUISetEventHandler ["Action", " if ((_this select 0) == tran0) then { // From init, checking if unit is tran0 if ((_this select 3) in ['GetInDriver','GetInPilot','GetInCommander','GetInTurret','MoveToDriver','MoveToCommander','MoveToTurret','MoveToPilot']) // Check if the actual action which got added to the unit is in this array and exit with hint// exitWith { hint 'Jump in cargo seats'; true }; }; "]; Help me to understand. I do not understand '_this select 3' because this is just the index of the given action to the object the EH got attached to. inGameUISetEventHandler 1 Share this post Link to post Share on other sites
scheintot2 12 Posted August 8, 2017 16 hours ago, pierremgi said: inGameUISetEventHandler This did not help me because I've already seen this. Like I've said, it is the index of the given action to the object the EH got attached to. If it is in the list, it is gonna exit with hint. But it will still not block the user to jump into the other seats of the given vehicle. I haven't had a chance to test it yet but I don't see why the user should not be able to jump into a driver seat. Share this post Link to post Share on other sites
JohnKalo 657 Posted August 8, 2017 Thanks for all the help but inGameUISetEventHandler ["Action", " if ((_this select 0) == tran0) then { // From init, checking if unit is tran0 if ((_this select 3) in ['GetInDriver','GetInPilot','GetInCommander','GetInTurret','MoveToDriver','MoveToCommander','MoveToTurret','MoveToPilot']) // Check if the actual action which got added to the unit is in this array and exit with hint// exitWith { hint parseText ('<t>Jump in cargo seats<t/>'); true }; }; "]; didn't work and [tran0,[[0,0],true]] remoteExec ["lockTurret",(tran0 turretOwner [0,0])]; [tran0,true] remoteExec ["lockDriver",tran0]; didn't work either. Is this an issue on my end alone or is it universal? Can you no longer disable vehicle seat positions? And the mission may have been posted here: https://forums.bistudio.com/forums/topic/208930-spcoop-1-4-brave-desperation/ but I would really like to know about this. Maybe I will need such a thing again in one of our future missions. Share this post Link to post Share on other sites
sarogahtyp 1108 Posted August 8, 2017 did u try to lock the turret on all clients? [tran0,[[0,0],true]] remoteExec ["lockTurret", -2]; [tran0,true] remoteExec ["lockDriver", -2]; Share this post Link to post Share on other sites
JohnKalo 657 Posted August 8, 2017 I just placed it in the init of the vehicle. Should I have done something else? Oh and while testing all players could change seats. Even the host. Share this post Link to post Share on other sites
pierremgi 4897 Posted August 8, 2017 6 hours ago, scheintot2 said: This did not help me because I've already seen this. Like I've said, it is the index of the given action to the object the EH got attached to. If it is in the list, it is gonna exit with hint. But it will still not block the user to jump into the other seats of the given vehicle. I haven't had a chance to test it yet but I don't see why the user should not be able to jump into a driver seat. It seems to me you are confusing the parameters 2 and 3. param 3 returns the " engine based action name " (like "moveInDriver"). I have a simple rule: I test all I write. If not, i mention "not tested". It's not 100% guaranteed and sometimes I miss something. The reason why the forum is so useful, for everyone, even for guys who try to help. But here, just test it... when you have time. Share this post Link to post Share on other sites
scheintot2 12 Posted August 8, 2017 17 minutes ago, pierremgi said: It seems to me you are confusing the parameters 2 and 3. param 3 returns the " engine based action name " (like "moveInDriver"). I have a simple rule: I test all I write. If not, i mention "not tested". It's not 100% guaranteed and sometimes I miss something. The reason why the forum is so useful, for everyone, even for guys who try to help. But here, just test it... when you have time. Yep, I confused 2 and 3. But still, if it returns true your script is basically just exiting with a hint. At least thats what I see. Share this post Link to post Share on other sites
pierremgi 4897 Posted August 8, 2017 6 minutes ago, scheintot2 said: Yep, I confused 2 and 3. But still, if it returns true your script is basically just exiting with a hint. At least thats what I see. What don't you understand when i write I tested it? True, here means override the arma's engine. See difference between example 2 and example 3. I suggest you test it before emitting any other doubt. I'd rather have some return of helicopterEnthousiast but it seems not interested in. Perhaps, your confusion? Share this post Link to post Share on other sites
scheintot2 12 Posted August 8, 2017 6 minutes ago, pierremgi said: What don't you understand when i write I tested it? True, here means override the arma's engine. See difference between example 2 and example 3. I suggest you test it before emitting any other doubt. Seems you are mad. I did not have a doubt. I just wrote "at least thats what I see". No matter what your test results are. I did not know that it is possible to override the default engine action because I read the wiki to fast. Now I understand why it should work. But helicopterenthusiast said it didn't. Share this post Link to post Share on other sites
pierremgi 4897 Posted August 8, 2017 15 minutes ago, scheintot2 said: Seems you are mad. I did not have a doubt. I just wrote "at least thats what I see". No matter what your test results are. I did not know that it is possible to override the default engine action because I read the wiki to fast. Now I understand why it should work. But helicopterenthusiast said it didn't. No, I'm not mad and you're playing with words. You spend time to post wrong things, not testing, and I spill my time trying to answer you in polite manner. 2 hours ago, helicopterenthusiast said: Thanks for all the help but inGameUISetEventHandler ["Action", " if ((_this select 0) == tran0) then { // From init, checking if unit is tran0 if ((_this select 3) in ['GetInDriver','GetInPilot','GetInCommander','GetInTurret','MoveToDriver','MoveToCommander','MoveToTurret','MoveToPilot']) // Check if the actual action which got added to the unit is in this array and exit with hint// exitWith { hint parseText ('<t>Jump in cargo seats<t/>'); true }; }; "]; didn't work and [tran0,[[0,0],true]] remoteExec ["lockTurret",(tran0 turretOwner [0,0])]; [tran0,true] remoteExec ["lockDriver",tran0]; didn't work either. Is this an issue on my end alone or is it universal? Can you no longer disable vehicle seat positions? And the mission may have been posted here: https://forums.bistudio.com/forums/topic/208930-spcoop-1-4-brave-desperation/ but I would really like to know about this. Maybe I will need such a thing again in one of our future missions. My script is working on Vanilla. The script you mentioned is not mine (a guy added some useless comment which could lead to errors). Refer to the script I wrote. On the other hand, my script work for Vanilla but can depend on the type of vehicle. If you want to be sure to block every seat you want, have a tour, first, with: inGameUISetEventHandler ["Action", " hint str (_this select 3) "]; Note the hints. Then add them in array I wrote in the script, if some are missing. Be careful it's case sensitive. And don't forget the shift betewwen seats inside the helo. I can't help you furthermore if you don't trust me and do something else without any explanation. Sorry for the Scheintot2 mess. Sometimes, it happens. Share this post Link to post Share on other sites
scheintot2 12 Posted August 8, 2017 5 minutes ago, pierremgi said: No, I'm not mad and you're playing with words. You spend time to post wrong things, not testing, and I spill my time trying to answer you in polite manner. My script is working on Vanilla. The script you mentioned is not mine (a guy added some useless comment which could lead to errors). Refer to the script I wrote. On the other hand, my script work for Vanilla but can depend on the type of vehicle. If you want to be sure to block every seat you want, have a tour with: inGameUISetEventHandler ["Action", " hint str (_this select 3) "]; first. Note the hints. Be careful it's case sensitive. And don't forget the shift betewwen seats inside the helo. I can't help you furthermore if you don't trust me and do something else without any explanation. Sorry for the Scheintot2 mess. Sometimes, it happens. Dude, I just did not understand your script. I've never written "your script CAN'T be correct because of this and that". I'm still trying to learn SQF and that is why I tried to understand it. Also I've never changed your script and he quoted your part. Not my part. You may try to take some distance from your code and not feel emotional attached to it. lol Oh and second, if you see it as a waste of time to answer me, why did you do it in the first place? I don't even want to know the answer. Im done here. Share this post Link to post Share on other sites
pierremgi 4897 Posted August 8, 2017 14 minutes ago, scheintot2 said: Dude, I just did not understand your script. I've never written "your script CAN'T be correct because of this and that". I'm still trying to learn SQF and that is why I tried to understand it. Also I've never changed your script and he quoted your part. Not my part. You take some distance from your code and not feel emotional detached to it. lol It was the case prior you "affirm"? or just "suggest"? I'm mad. At least, even in international language, a question ends by a "?". For someone still learning, may I suggest you use this kind of sentences? always preferable at any wrong affirmation. How many time did you use it? Never. I'm not emotional for my script. Just having some temptation right now, concerning your posts. But, no reason to feed the troll. Share this post Link to post Share on other sites
sarogahtyp 1108 Posted August 8, 2017 @pierremgi thx for showing the usage of that EH. Seems to be very usefull Share this post Link to post Share on other sites