wass24 0 Posted March 31, 2005 I don't know if this is a mission editing question or a modeling question. Is there a way of having the player walk up to a vehicle and choose what seat he wants, instead of the order that's determined in Oxygen? When I approach a vehicle, I want to be asked if I want to sit in each available spot and select the one I want. Thanks. Share this post Link to post Share on other sites
hardrock 1 Posted March 31, 2005 Not possible, cargo slots are filled in order. You can try to fill some slots with invisible logics so that they optically stay free, not sure if it'd work though. Share this post Link to post Share on other sites
wass24 0 Posted March 31, 2005 Maybe this should be considered for OpFlash 2. Or the ability to use the number keys to move to a particular seat while your in a vehicle like some of the newer games. Share this post Link to post Share on other sites
Chris Death 0 Posted March 31, 2005 This can be done scripted way by mission editors. AddAction to vehicles + mount some dummies onto the empty places between 0 and the player's choice + remove the dummies again. ~S~ CD Share this post Link to post Share on other sites
wass24 0 Posted March 31, 2005 Do you have an example script for that? Share this post Link to post Share on other sites
Chris Death 0 Posted March 31, 2005 Nope - i ain't got OFP access atm - but as this is just some simple a+b+c math's and a couple of moveincargo commands, i'm sure that sooner or later somebody will pop up with one ~S~ CD Share this post Link to post Share on other sites
Blanco 0 Posted March 31, 2005 Nope - i ain't got OFP access atm - but as this is just some simple a+b+c math's and a couple of moveincargo commands,i'm sure that sooner or later somebody will pop up with one  ~S~ CD Hmmm, nothing is really easy in OFP... It could look easy at first sight but when you start writing you always run into a problem you've never expected. But that's challenge, no?  I tried this a few months ago but I've never finished it. First the script has to know how many cargospaces there are. You could do this via a database but I think I've found anther way,but  I don't know it's fullproof [nameof vehicle] exec "countcargo.sqs" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; countcargo by Blanco 23-12-2004 _veh = _this select 0 _spaces = 0 _logs = [] #loop _log = "logic" createvehicle (getpos _veh) _logs = _logs + [_log] _log moveincargo _veh ~0.1 if (_log in _veh) then {_spaces = _spaces + 1;goto "loop"} else {goto "nospacesleft"} #nospacesleft hint format ["This vehicle has %1 cargospaces",_spaces] ~1 "deletevehicle _x" foreach _logs exit It's a start huh? Share this post Link to post Share on other sites
wass24 0 Posted March 31, 2005 I need it to count the spaces and ask me which one I want to sit in (that's not already filled.) Can you name a position or proxy in O2, such as: front passenger, back left, right, middle, ... and so on? Also, can an action be created to go along with "moveindriver" and "moveincargo" to read something like "moveinbackleft." It's probably part of the code that can't be changed. I'm going on vacation for a week and won't be able to check this thread for a little bit, but I hope it generates enough interest to stay alive and get some good ideas. Thanks. Share this post Link to post Share on other sites
General Barron 0 Posted March 31, 2005 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Also, can an action be created to go along with "moveindriver" and "moveincargo" to read something like "moveinbackleft." It's probably part of the code that can't be changed. Well... I've seen many an addon with actions such as "open left door" or something similar. Basically, it sure as heck is possible to add actions to a vehicle via the config. So if an addonmaker wanted to, he could add those actions in; he would just have to do the appropriate scripting to make the actions work right. Actually, these actions work way better than scripting actions, since you can control where they are attatched to on the model, what their radius is, etc. Share this post Link to post Share on other sites
@cero 0 Posted April 3, 2005 I was sugesting something similar on DKMJaguar's C130 topic. You may want to read the quotes below, there is a link to the  page in the DKM topic, so you can see what I was sugesting, and then below my post what UNN seem to have come around with, so if you read them post in there and contact UNN you may be able to work on this and find some answers for each others project. I don't know ohw is he doing it, but I know that its not possible to name cargo proxies, even in O2. But I know that they have an order of acces, so indirectly yeah, they are named, because if you know what spaces are being used first and last you could find a way around to script it giving the player custom actions on the action menu suplied by that  scripted work around. I can't see this being a thing that would work in any vehicle with one script, you possibly would have to do that for each vehicle, one script for each model, or do a class on each script, so the editor can add the script "1" to a vehicle that have two cargo seats, like the jeep with MG for example, script "2" to a vehicle that have three cargo seats, and so on. Not a system for dummy editors though. UNN Posted: Mar. 31 2005,08:59 on this topic. Quote[/b] ]Quote[/b] ]The question there and then would be, can cargo proxies be made accesable and unaccesable bya scripting? maybe by adding some kind of invissible unit or something, that swap seats with a unit in the cargo bay decide to get ready to jump or change his mind and go back to the "Seating down" cargo proxy.Dont want to take this to far off topic, so I'll make it quick  I am working on scripts to do exactly that, but for more than just para drops:CSJ's carabou Para Drop And an earlier test anim of a different sort WWII Beach landing Anim. But yes, I think it is possible. Regards. @CERO. Edited link. Share this post Link to post Share on other sites
UNN 0 Posted April 4, 2005 Chris and Blanco about covered it. The easiest way is. Before each guy gets in, just fill all the empty cargo seats with game logics using a function called from the getin event. Then remove the logic that occupies the seat your after: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">((Crew _Vehicle) Select _SeatNum) Action ["GetOut",_Vehicle] Then just move your guy in with MoveInCargo, and finally delete all the remaining gamelogics, ready for the next person to get in or not. He will appear in the correct slot. Share this post Link to post Share on other sites