48 lines
1.3 KiB
Text
48 lines
1.3 KiB
Text
//-------------------------------------------------------------------------------
|
|
// Test_VehicleRide.Scr
|
|
//
|
|
// - Example code used to have the player ride as a passenger in a vehicle.
|
|
// (as in t2l2)
|
|
//
|
|
//
|
|
// NOTES:
|
|
// In the editor, be sure to have the player vehicle target the appropriate
|
|
// collision entity.
|
|
//-------------------------------------------------------------------------------
|
|
|
|
level waittill prespawn
|
|
level waittill spawn
|
|
|
|
main:
|
|
|
|
level.playerjeep = $s1_jeep1
|
|
level.playerjeep nodamage // don't want the vehicle to be damaged
|
|
|
|
level.playerjeep thread global/vehicles_thinkers.scr::PLAYER_JEEP_CONTROLLER
|
|
level.playerjeep thread PLAYER_JEEP_Drive
|
|
|
|
end
|
|
|
|
//-------------------------------------------------------------------------------
|
|
PLAYER_JEEP_Drive:
|
|
//
|
|
// This is where you can define the path you want the vehicle to take...
|
|
//-------------------------------------------------------------------------------
|
|
// speed
|
|
self drive $jeepfirstpath 250
|
|
// speed accel look_ahead
|
|
self modifydrive 250 100 256
|
|
self waittill drive
|
|
self stop
|
|
|
|
wait 5
|
|
|
|
self drive $path_two 250
|
|
// speed accel look_ahead
|
|
self modifydrive 500 100 256
|
|
self waittill drive
|
|
self stop
|
|
|
|
|
|
end
|
|
|