Jump to content
Sign in to follow this  
FelixK44

Need help with script!

Recommended Posts

I'm trying to spawn "car1" on the nearestRoad 300m from "player", I've tried (getpos NearestRoads player) and it doesn't work. :confused:

car1 = createVehicle ["Lada1", [(getpos player) select 0,(getpos player) select 1,0], [], 575, "FORM"];

---------- Post added at 07:36 PM ---------- Previous post was at 07:14 PM ----------

Well, once again I asked for help too soon.

If anyone else is interested........

CREATE MARKER IN EDITOR NAME IT roadMarker


_templist = player nearRoads 50;
if (count _templist == 0) exitwith {Hint "Spawn Failed"};
_trk = _templist select 0;

"roadMarker" setMarkerPos (getpos _trk);

//Car1 can be anything, "VehicleClassName" should be name of vehicle Lada1 etc. "375" is the spawn distance from marker.

Car1= createVehicle ["VehicleClassName", [(getMarkerPos "roadMarker") select 0,(getMarkerPos "roadMarker") select 1,0], [], 375, "FORM"];

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×