Hey Jimmyjbo,
I've had a good look at the vehicle_thinkers.scr and can get the truck to do all the right things but all the other vehicles is a different story.
From what I understand, the scripts in that file are more to do with the SP game itself rather then free thinking vehicles to use.
The tanks will drive, explode and have men comming out of it but are only designed to target and shoot at an entity called
level.playertanktarget. So if you create a script origin, assign it to
level.playertanktarget and bind it to $player they should start shooting at you. My theory as yet untested.
Otherwise the targetting is done via routines in the level scripts themselves using proximity, origins and triggers.
some of the other vehicles -
The bike can not be ridden or have riders from this script. It only sets up the explosion/death effects. If you try the normal drive routine on the bike, it moves but the wheels don't turn.
Same with tha halftrack, except that it does set up the MG42 which can be used, but I had to take apart and rewrite the Halftrack section in map m3l3 to get the halftrack to shoot at the player for my map.
Tha artillary is setup to blow up on death but need the
level.playertanktarget to shoot.
Like tltrude said, there are other scripts around and if you take the vehicles_thinkers.scr apart, there is good solid ground to write your own script.
///////////////////
I have made moving tanks before which although don't shoot at the player (yet to try), will stop for the player and play the animation when killed. This is how I did it.
I used a vehicles/panzer_tank.tik
targetname - panzertank
then created info_waypoints to form a path with a targetname - panzertank_path
this line goes in the script -
$panzertank thread global/vehicles_thinkers.scr::enemy_tank_think
1 panzer
what it means -
$panzertank thread global/vehicles_thinkers.scr::enemy_tank_think --> calls the thread
1 --> this one is very important.
If you set this to 1, the tank will become a none attacking tank, it will only drive. When you destroy it the Germans will come out from the wreck.
If you set this number to 0, it will become an attacking tank, however if you do not have the
level.playertanktarget in your map, it will stop the script and wait until it appears making your tank useless.
panzer --> this one has to do with the model of tank u are using so that the right damaged/destroyed models are used on death. In this case I used
panzer as I am using a panzer tank.

the other ones are - empty_turretless_tiger, panzer_desert, empty_panzer_desert, empty_tiger or leave it blank for the plain tiger tank.
to make the tank drive I used the following -
$panzertank.health = 100 // for testing only
$panzertank drive tigertank_path 10 30 200 400 // nice and slow
$panzertank waittill drive
I changed the heallth of the tank to 100 so I can kill it with a rifle
also if you add -
$panzertank.driving = 1
before the - global/vehicles_thinkers.scr::enemy_tank_think 1 panzer
the tank will stop if the player is near it, otherwise it will just keep going.
//////////////////
I know your almost there but I thought I'd just post what I use to run the truck in my map.
My map has a model vehicles/opeltruckgreen.tik in it with targetname 'truck01'.
I have also set up info_waypoints with the first one targetname 'truck01_path'
My script goes like this -
$truck01 thread global/vehicles_thinkers.scr::enemy_truck_think 500 6 $truck01_path NULL green "human//german_wehrmact_soldier.tik"
$truck01 modifydrive 270 500 256
$truck01 waittill drive
$truck01 disconnect_paths
so if you break the vehicles_thinkers.scr thread activator into parts it would go like this -
$truck01 thread global/vehicles_thinkers.scr::enemy_truck_think
500 6 $truck01_path NULL green "human//german_wehrmact_soldier.tik"
$truck01 thread global/vehicles_thinkers.scr::enemy_truck_think--> calls thread
500 --> the health of the truck
6 --> The number of germans on the back
$truck01_path --> the path for the truck to drive
NULL --> targetname of the trigger to start driving, none in this case so the truck start moving straight away
green --> this is the refrence to the truck model type - either green or NULL, this is important when the truck is destroyed so the right destroyed model is placed on death.
"human//german_wehrmact_soldier.tik" --> this is the Ai model u wish to have on the truck.
The Germans will jump of the truck when it reaches the end of the path or u kill the truck.
Provided the info_waypoints are setup correctly it should work right.
Also if you add
$truck01.nolights = 1
in your script before you thread the vehicles_thinkers.scr, the trucks headlight will be turned off, a nice thing if it's daylight.
//////////////////////////
Phew, hope it all makes sense
Cheers
Mirek