blanic 0 Posted January 14, 2011 Really tired right now and taking the easy way out, can someone at least get me started on a script that would force a player (in multiplayer) into a vehicle using an addaction command. Thanks Share this post Link to post Share on other sites
HateDread 13 Posted January 14, 2011 What do you mean by 'forcing' them into it? You mean, the player approaches a vehicle, selects your custom action, and is then in the vehicle? How does that differ from 'get in'? :p Share this post Link to post Share on other sites
zapperguy 1 Posted January 14, 2011 I thought he was referring to making a recalcitrant teammate get into a vehicle so the mission could proceed. Either way I'm not sure how you'd script it. Share this post Link to post Share on other sites
Egosa-U 10 Posted January 14, 2011 Lets say youre Player1 (Name: P1) and you want Player2 (Name: P2) to be in cargo, as you enter the vehicle (Name: Car1). You could setup a trigger like: Condition: P1 in Car1 On Activation: P2 moveincargo Car1 As soon as you enter the vehicle, P2 will be teleported into the vehicle.. You could even lock the vehicle afterwards...so he doesnt get out again. Share this post Link to post Share on other sites
celery 8 Posted January 14, 2011 What kind of people do you play with if they need to be scripted in place? Share this post Link to post Share on other sites
mosh 0 Posted January 14, 2011 What kind of people do you play with if they need to be scripted in place? My guess would be cops and robbers mission. If not I wonder same question... :) Share this post Link to post Share on other sites
blanic 0 Posted January 14, 2011 yes its a cops and robbers one, wanting to move a restrained player into a car is exactly what i am asking. Share this post Link to post Share on other sites
tj72 0 Posted January 14, 2011 You could try disableuserinput command - player cant controll his avatar then, pretty restraining but I guess it would fit. then try to playmove or switchmove to animate him to approach the vehicle and then see if moveincargo will work. Id be interested to know if it does.... You could also just send a message to the player to instruct him in the car within a certain time frame. If he fails to enter the car you could setdammage him to simulate beating him untill he gets in the car of his own will. Gosh that sounds mean....just....mean. Share this post Link to post Share on other sites
blanic 0 Posted January 14, 2011 no i have them already restrained on the ground not a problem there its getting them from the ground to the car, what would the command be? ---------- Post added at 10:02 PM ---------- Previous post was at 10:00 PM ---------- this is what im working on _target = _this select 0; // action associated with player _vehicle = _this select 3; // vehicle passed as parameter to the script _target moveincargo _vcl; ---------- Post added at 10:14 PM ---------- Previous post was at 10:02 PM ---------- player addaction ["Put into Car","noscript.sqf",'(nearestobjects [getpos player, ["Air", "Ship", "LandVehicle"], 3] select 0) execVM "arrest.sqf";',1,true,true,"",'_vcl = (nearestobjects [getpos player, ["Air", "Ship", "LandVehicle"], 3] select 0);player distance _vcl < 5']; arrest.sqf _target = _this select 0; // action associated with player _vehicle = _this select 3; // vehicle passed as parameter to the script _target moveincargo _vcl; Share this post Link to post Share on other sites
zonekiller 175 Posted January 14, 2011 you may be able to attach them to you with the attachto command then detach and moveincargo when your close to the car for a good effect that way they can struggle but not get away Share this post Link to post Share on other sites
blanic 0 Posted January 14, 2011 but do you think it is close to what i posted? its not working to get them into the vehicle. Share this post Link to post Share on other sites
Gekkibi 11 Posted January 14, 2011 Is it working in the editor? If I recall correctly the target of moveInCargo has to be local to the one who executes the command. Share this post Link to post Share on other sites
tj72 0 Posted January 14, 2011 (edited) Nevermind I thought your variable was undefined but I might have mispoke. Make sure -showscripterrors is on in case there is.... Edited January 14, 2011 by TJ72 Share this post Link to post Share on other sites
blanic 0 Posted January 15, 2011 well what i put doesnt work so, im still at square 1. Share this post Link to post Share on other sites
zonekiller 175 Posted January 15, 2011 (edited) _target = _this select 0; // action associated with player_vehicle = _this select 3; // vehicle passed as parameter to the script _target moveincargo _vcl; you have _vehicle and _vcl should it not read _target moveincargo _vehicle; Edited January 15, 2011 by Zonekiller Share this post Link to post Share on other sites