Moving Car

Tutorial collection, comprehensive listings on main site.

Moving Car

Postby Tutorial on Fri Aug 11, 2006 10:38 pm

category
Counter-Strike: Source

description
Prop based cars that move very much like those seen in de_nuke.

keywords
cs, source, counter, strike, counter-strike, car, de_nuke, model, moving.

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.

Image

Create a "logic_relay" :logic_relay: entity and open it up. name it "relay1" go outputs and click on add. type in the following:

OnTrigger
car1
SetAnimation
run

(delay can be added but not necassary)
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:

OnTrigger
relay1
trigger

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

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.
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby devilnevercare on Sun Aug 27, 2006 5:17 pm

so i was wondering, how would you put in multiple logic relays into the the thing that was moving...

i.e. make it move from one logic relay to another.
devilnevercare
Dumpling
Dumpling
 
Joined: Tue Apr 11, 2006 4:04 pm

Postby zombie@computer on Sun Aug 27, 2006 5:29 pm

devilnevercare wrote:so i was wondering, how would you put in multiple logic relays into the the thing that was moving...

i.e. make it move from one logic relay to another.
You are simply making the car do an animation, the entity does not actually move. Therefor, you cant control how it moves. use path-tracks if you want that
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Postby devilnevercare on Sun Aug 27, 2006 5:32 pm

ok thanks, ill look for a tutorial about path tracks...

and thanks for the quick reply., : )
devilnevercare
Dumpling
Dumpling
 
Joined: Tue Apr 11, 2006 4:04 pm

Postby SoulReaper on Mon Aug 28, 2006 6:18 pm

kwl tut man, short and simple. But to expand we need our own ideas. What about a second tut with path tracks?
SoulReaper
Been Here A While
Been Here A While
 
Joined: Wed Aug 02, 2006 11:50 am

Postby Spas12 on Mon Aug 28, 2006 6:44 pm

SoulReaper wrote:kwl tut man, short and simple. But to expand we need our own ideas. What about a second tut with path tracks?


thanks :D

to learn how to use path_track entities follow the advanced elevator tutorial. it'll tell you what you need to know.
Past Treyarch Level Designer

Portfolio
Spas12
Veteran
Veteran
 
Joined: Thu Mar 31, 2005 3:21 pm
Location: trapped in level-design factory, send help

Postby Rocket on Fri Jul 27, 2007 11:01 pm

how do i set this do it infinite times? atm it just does it once :(
Rocket
Just Joined
Just Joined
 
Joined: Fri Jul 27, 2007 10:58 pm

Re: Moving Car

Postby chargers5583 on Mon Jun 29, 2009 5:55 am

I have got to try this!
User avatar
chargers5583
Member
Member
 
Joined: Thu Mar 12, 2009 3:22 am
Location: Home of the CHARGERS

Re: Moving Car

Postby Thalion on Mon Nov 02, 2009 2:23 am

This is nice, but how do you make your own moving brushed based "car"? I want to make my own vehicle and have it move on a specified track, how would I do this? NOT using models though.
Thalion
Dumpling
Dumpling
 
Joined: Mon Nov 02, 2009 2:21 am

Return to Tutorials

Who is online

Users browsing this forum: Bing [Bot]

cron