3l0ckad3 17 Posted November 1, 2016 Short and sweet, AI is driving and I don't want the player taking the driver position from him because then the AI won't drive out of view and delete... I googled the hell out of this for 2 days now to no avail :(Thank you in advance Share this post Link to post Share on other sites
M1ke_SK 230 Posted November 1, 2016 Try to search first. vehicleName lockDriver true; More here lockDriver Share this post Link to post Share on other sites
3l0ckad3 17 Posted November 1, 2016 Try to search first. vehicleName lockDriver true; More here lockDriver I have been looking for two days, and this locks the position for the AI too, I have read A LOT of topics on this and the best I have found so far is below. I always exhaust all resources before posting to the community. I had a raid0 crash a month ago,, so I'm having to mission create for my community from scratch without my syntax repository :( // player not allowed in driver,, only AI if (!isDedicated) then { [] spawn { waitUntil {player == player}; while {true} do { waitUntil {sleep 1; (vehicle player != player)}; if ((driver (vehicle player)) == player) then { systemChat "You are not allowed in the driver's seat, moving you to cargo"; _theVeh = vehicle player; moveOut player; player moveInCargo _theVeh; }; }; }; }; But this kicks the player out of the quad as it has no cargo index I'm thinking. When the player gets booted from the vehicle it kills him due to the velocity of the vehicle in motion,, so I'm looking for something where there is just no option to take the position, or disabling it and returning a system message warning the player. Share this post Link to post Share on other sites
M1ke_SK 230 Posted November 1, 2016 I have been looking for two days, and this locks the position for the AI too, I have read A LOT of topics on this and the best I have found so far is below. I always exhaust all resources before posting to the community. I had a raid0 crash a month ago,, so I'm having to mission create for my community from scratch without my syntax repository :( You described problem "Short and sweet", so the answer is limited to your question. Now you extended your problem. Why did you not described it more in depth? You were asking for solution, not for solving problem. Share this post Link to post Share on other sites
3l0ckad3 17 Posted November 1, 2016 You described problem "Short and sweet", so the answer is limited to your question. Now you extended your problem. Why did you not described it more in depth? You were asking for solution, not for solving problem. Because it is simple, no need to write a bible long thread, I simply want to lock the driver position for the player but not the AI. I don't mind solving the negotiation on my own, I just need help being pointed in the right direction. Sometimes I need the answer as it is so complex it reaches my limits with scripting, but often I rather learn what is going on for future engagements with like minded problems and negotiations.. I'm also the type of person that does things just to learn, so sometimes my questions are educational and not pertaining to a missions or a tangible negotiation.. I do TONS of reading to better myself in the editor,, I'm not lazy by any means, of course I don't think I am. I'm even on a waitlist for school to better myself in these regards, so in the future I plan to better myself in scripting both on and off game. Share this post Link to post Share on other sites
Tajin 349 Posted November 2, 2016 You could use an eventhandler to lock the driverseat once the AI is in it and while the vehicle is moving. Otherwise unlock it but kick the player out if he gets into it. Shouldn't be that hard. Anyhow. You could also use an action eventhandler: https://community.bistudio.com/wiki/inGameUISetEventHandler Example 3 on that page is roughly what you're looking for. 1 Share this post Link to post Share on other sites
theend3r 83 Posted November 2, 2016 When the player gets booted from the vehicle it kills him due to the velocity of the vehicle in motion. Why don't you just solve this smaller problem instead of solving the larger one? :huh: Set the booted unit's velocity to [0,0,0] and place it at some offset from the vehicle so it isn't driven over. 1 Share this post Link to post Share on other sites
3l0ckad3 17 Posted November 4, 2016 You could use an eventhandler to lock the driverseat once the AI is in it and while the vehicle is moving. Otherwise unlock it but kick the player out if he gets into it. Shouldn't be that hard. Anyhow. You could also use an action eventhandler: https://community.bistudio.com/wiki/inGameUISetEventHandler Example 3 on that page is roughly what you're looking for. I'm not very familiar with eventHandlers, I just solved the problem by switching to a victor that had a cargo index. I was using the quad, but as far as I can tell it had no index to boot him into cargo so it just kicked him out of the victor, I used the above syntax with another victor and it worked like a charm. Maybe I should look into EventHandlers for future use, but my scripting knowledge is limited.. Thank you for the point in the right direction :) Share this post Link to post Share on other sites