Vehicle from point A -> B

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
SNakeFluGeL
Sergeant
Posts: 56
Joined: Wed Jul 02, 2003 4:52 pm

Vehicle from point A -> B

Post by SNakeFluGeL »

How can I let a vehicle drive from one point to another!
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post by HappyChappy_7000 »

//vehicle starts on point A

$yourvehiclename drive $pointb :wink:
What? You know who I am?
SNakeFluGeL
Sergeant
Posts: 56
Joined: Wed Jul 02, 2003 4:52 pm

Post by SNakeFluGeL »

Is that a joke or does it actually work? Do I need way-point or help me out here :(
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post by Angex »

Thats all the scripting required to make it drive.

Just make a vehicle with a $targetname (e.g. vehicle), and a waypoint with a $targetname (e.g. point1) and use the command drive. You can setup a route by having the first waypoint target another (e.g. point2), and so on for as long as the route needs to be.

Then use $vehicle drive $point1 and it'll follow the route.
SNakeFluGeL
Sergeant
Posts: 56
Joined: Wed Jul 02, 2003 4:52 pm

Post by SNakeFluGeL »

hmm it doesn't seem to work =(

I made an static/vehicle/german/opentruck and gave him the targetname $allied_truck then I made a way point in a straight line with the truck but like 5 inch away from it, then I gave that waypoint the targetname $wayp_01 and in my script I wrote

$allied_truck drive $wayp_01

since that didn't work I tried to make the truck a script-object, but didn't work either... what am I doing wrong?
SNakeFluGeL
Sergeant
Posts: 56
Joined: Wed Jul 02, 2003 4:52 pm

Post by SNakeFluGeL »

Must I make it drivable first?

drivable
+ Make the vehicle drivable

drive( Vector position, Float speed, Float acceleration, Float reach_distance, Float look_ahead, [ Vector alternate_position ] )
+ Makes the vehicle drive to position with speed and acceleration until reached_distance close to position
SNakeFluGeL
Sergeant
Posts: 56
Joined: Wed Jul 02, 2003 4:52 pm

Post by SNakeFluGeL »

hmm it does seem to work with the jeep, but how do you know which vehicles are just a static object and which are capable to drive...

cause it seems the opeltruck can't drive (which is a shame)
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post by HappyChappy_7000 »

right-click --> vehicle --> german --> opeltruck :wink:

static vehicles cant drive
What? You know who I am?
Post Reply