Making a vehicle move?


smashingpunk007
03-14-2007, 04:08 PM
How can i make a vehicle move? I don't want it to be drivable i just want it to be able to move similiar to the "tank" maps. The idea is to plant a bomb on a truck, once it is planted the truck drives towards a building and blows up the side of the building.

The only way i could think of making it is to draw a path with the vehicles and then enable and disable them one after the other, to give the illusion of movement. But i don't know how much of an fps hit that would take.

Can anyone help me execute this? I already know how to make things destroyable, i just need to find out how to make the vehicle move. Thanks.

Dustin Diamond
03-14-2007, 04:27 PM
you'll have to use func_tracktrain and point_track entities. You are essentially making a horizontal elevator. So look for tutorials on how to make elevators.

Basically, you'll parent the prop_dynamic truck to the func_tracktrain (which can be invisible). The func_tracktrain is like the elevator car, and the point_track marks the path it will follow. Like I said, check for elevator tutorials, and then just lay everything over on it's side.

l3eeron
03-15-2007, 02:59 PM
Ive been trying to tackle this too. The way I got a tank to work is:

Use a path_tracktrain and lay out your track by using the top view window. create the first path_tracktrain name and it track_train1. While in the top view window, select the track_train1 patch. Now hold down shift and drag over to the next point in your track, then release the mouse where you want it. Repeat until you have the whole track (holding shift will automaticly rename each patch_tracktrain and keep em all in succession) now that you have your track, lets make the train.


Create a small invisible platform. Tie it to func_tracktrain and name it train1. Set its first stop to track_train1. Check the HL1 style flag. Next create a brush (can be any normal texture, func_traincontrols dont get rendered) area where you want the player to be able to hit the +use key to start the controls. Tie that brush to func_traincontrols and its parent to train1 and controls to train1. Last but not least place a prop_dynamic on top of the invisible train. Name it model_train1. Parent the prop to train1. complie n run! Now you should be able to control the prop_dynamic as if it were the train =)

This is all from memory, I may have left something out but thats 95% it - good luck!!!


Send me a PM if you need more details, or hit me up on steam friends - L3eeron


FYI - this is the easy way to make a vehicle move, its very limited. If you want to be able to steer around (not on a track) then thats pretty complicated, I think snarkpit has a tut on it

the_irate_pirate
03-15-2007, 03:23 PM
Well you can use the "train" method, but have none of you tried this (http://www.hl2world.com/wiki/index.php/Controllable_Brush_Vehicle) method?

l3eeron
03-15-2007, 03:31 PM
lol, thats the complicated one I was talking about. It would be a monster for any server to render in real time for multiplayer - right???

the_irate_pirate
03-15-2007, 03:35 PM
I don't think so. But it would probably suck anyways :D. I tried it, it felt like driving a hovercar. Also, the game kept crashing. Something with the game_ui entity..

Watchtower
03-19-2007, 03:12 AM
If you decompile the model you want to use as the vehicle for me and zip it up, Ill animate it to start, stop and move. Very quick and easy to do.

BUT, i will emphasize again, it must be decompiled in to the .smd's, all the textures must be there etc. .3ds or .max format works too.

regards

l3eeron
03-19-2007, 08:42 AM
If you decompile the model you want to use as the vehicle for me and zip it up, Ill animate it to start, stop and move. Very quick and easy to do.

BUT, i will emphasize again, it must be decompiled in to the .smd's, all the textures must be there etc. .3ds or .max format works too.

regards


Hey watchtower! This sounds like exactly what I need help with! Im trying to get the stock sherman tank to have some kind of animation to "roll" down the streets of my ruined city...

I have it all working but it just looks really dumb with a tank that has no moving parts. Id even be willing to pay you to do this for me, Ill never have the time to model it myself... Help me out buddy, thanks

Watchtower
03-20-2007, 12:37 AM
Hey watchtower! This sounds like exactly what I need help with! Im trying to get the stock sherman tank to have some kind of animation to "roll" down the streets of my ruined city...

I have it all working but it just looks really dumb with a tank that has no moving parts. Id even be willing to pay you to do this for me, Ill never have the time to model it myself... Help me out buddy, thanks

Thats not a problem, the annoying part is trying to find a decent way to compile and decompile the models.

The stock 'studiomdl.exe' is ok, but if something isn't right, it just flicks on and off in dos.

So, like I said. If you have a way of decompiling and recompiling the models, send a zip with all the neccessary components together and Ill have those wheels a' rolling.

Watchtower
03-24-2007, 01:09 AM
Good news to the community:

Shouldnt be long before I release a version of the Sherman with moving tracks and wheels.

The wheels are already good and spin, but...

The only problem I'm trying to solve is the fact that the sherman only uses 1 material so the tracks's texture may appear to be staying still when animated

If anyone has insight into this pm me.

wt

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.