Moving Car

This tutorial will show you how to move a car using a models scripted sequence rather than using path_tracks.

Make a prop_dynamic entity. The car model we will have to use is: models/props/de_nuke/car_nuke_animation.mdl

Set the name to "car1" and I recommend using bounding box for collisions. you can also change the skin to your liking.

news post image

Create a "logic_relay" <!-- s:logic_relay: --><img src="https://www.interlopers.net/forum/images/smilies/logic_relay.jpg" alt=":logic_relay:" title="logic_relay" /><!-- s:logic_relay: --> entity and open it up. name it "relay1" go outputs and click on add. type in the following:


(delay can be added but not necassary)
news post image

We have triggered our car to succesfully drive using nothign more but an animation scripted only for this car model. Understand that valve used a much more simpler and effective way to move a model, rather then using choppy path_track entities. We have triggered our car via a trigger entity, now we have to assign whats going to trigger THAT entity.

If you havent already placed an info_player_spawn then do so. create a box covered with the trigger texture and make it a trigger_multiple. Make sure it is in teh info_player_spawn entity. open it up and go to outputs and click on add again. add the following:


(delay can be added but not necassary, and make sure the "fire once only" flag is ticked off.

news post image

So thats it! when you spawn you will trigger a trigger_multiple to set off the logic_relay entity that will then set the animation for car to drive. according to your settings you can make the car drive once, or make it for an infinite sequence. If it goes well, you can place it in your CSS map. Notice that the car disappears and then reapears at its starting location, that is the animation set for the car. If you want it to be longer your going to have to edit the animation, and thats something you cannot do in hammer.

View comments ( 8 )

Back to top