Truck Riding questions

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
MC Disgruntled Goat
Lance Corporal
Posts: 22
Joined: Mon Sep 02, 2002 9:58 pm

Truck Riding questions

Post by MC Disgruntled Goat »

Hey guys

I have a truck with a clipped collison entity attached. Truck works fine, it runs path and players can ride in it. Two problems remain however:

1. Truck changes elevation on the road a few times. If player is too close to the front of the truck, the truck stops until he moves closer to the back.

2. What is the command so players cannot be harmed by the truck? Several times the truck takes a turn and whoops the players butts if they are in the wrong spot.
Thanks a lot for any help
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

2. You could try to make the player non-solid. If the player is stored in local.player, type this when the ride starts:

Code: Select all

local.player notsolid
Afterwards, type:

Code: Select all

local.player solid
Maybe that does the job :D.
Image
Gizzy (nl)
Sergeant Major
Posts: 101
Joined: Tue Dec 03, 2002 3:41 pm
Location: Netherlands
Contact:

Post by Gizzy (nl) »

but is it still possible that the player will be hit ???
greets, Gizzy (nl)

Image
MC Disgruntled Goat
Lance Corporal
Posts: 22
Joined: Mon Sep 02, 2002 9:58 pm

Post by MC Disgruntled Goat »

Yeah, I was worried about that as well. The truck is headed toward an enemy elevated position so I need them to be injured by bulletfire. I tried a $player nodamage $truck but that made the player invulnerable to everything. I also tried a script origin 'glue' spot in the back like in m4l2. It worked okay, but the player was still injured by the truck turning. I also wanted the player to be able to leave the truck at any time if enemy fire got too bad, instead of a predetermined drop point. I think what I am going to try is have a clipped textured crate glued to the back of the truck. It will still give cover to the player but won't let the player get to close to the front of the truck to impede the truck's progress. Also, at the back, the truck turning didn't cause injury. Is there any other ways anybody would know of?
matt_moh
Sergeant
Posts: 65
Joined: Sat Feb 08, 2003 12:04 am

Post by matt_moh »

Don't use an actual vehicle. Make a script model and give it a key/value of model/"whatever truck you want". Then make a series of info_splinepaths for the truck to follow. That's how it is done in m4l2 and m4l3. In your script, you can have something like $truck playsound m4l2_truck1 when ever the truck is moving. Try to take a look at the scripts for m4l2 and m4l3 to get a better idea of how it is done.
MC Disgruntled Goat
Lance Corporal
Posts: 22
Joined: Mon Sep 02, 2002 9:58 pm

Post by MC Disgruntled Goat »

Thanks Matt, but the truck runs fine. It follows it's path and loops back around fine. It is with the player passengers where the problems are. I have looked at m4l2 and tried some stuff out of it but it is geared toward single players. I can't make the player non-solid or impervious to the truck as other players have to be able to injure them.
Post Reply