airplane flyby models ??


mXed.dk
01-29-2004, 06:24 AM
how many flybys models are there in dod ??
if u could make an list
and tell me how to combind a flyby with a sound and a bomb hit

Cole
01-29-2004, 08:47 AM
Theres

glider_flight.mdl
and
p51.mdl

Draft Dodger
01-29-2004, 03:40 PM
Hmmm, a flyby bomb drop tutorial...let me see what I can theorize here...I think we could do this using a func_tracktrain or by using an animated model. Be warned, this is all untested because I'm typing this from work.

func_tracktrain method
First you need to create a series of path_track (http://collective.valve-erc.com/index.php?ent=path_track) entities that the airplane will follow on it's bombing run.
Set the targetname of each of these to strafe#; so the first path_track will be strafe1, the second strafe2, etc. Now set the target for each of these to the next path_track in line; leave the last path_track's target blank.

Now you've created the path the airplane will follow, now you need to create the actual airplane.
Create an airplane out of several brushes and turn them into a func_tracktrain (http://collective.valve-erc.com/index.php?ent=func_tracktrain). Make sure the airplane is facing west (left from the top view), but don't worry--when the level starts the brush will move to it's first path_track and point itself to the next path_track. Also make sure that in the middle of the airplane there is a brush covered with the origin texture or this won't work at all.
Set the airplane's targetname to airplane, and set it's target to the first path_track, strafe1. Play with the startspeed variable to determine how fast the plane will fly by.

Now we need to have the plane drop the bomb; I'm thinking of using an env_shooter (http://collective.valve-erc.com/index.php?ent=env_shooter) which will shoot a bomb model toward the ground. You'll have to create the bomb model.
Pick a path_track entity where you want the airplane to drop the bomb and place an env_shooter right underneath it. Orient the env_shooter so it is pointing in the same direction the airplane will be at that point. Set the targetname to bombdrop and the shootmodel to the path where your bomb model is, something like models/bomb.mdl.

To get the env_shooter triggered we need to set something for that path_track right next to the env_shooter. Set the message value to bombdrop, the name of our env_shooter. Now when the func_tracktrain that is our airplane reaches this path_track, it will trigger bombdrop, which is the env_shooter.

You'll probably want the bomb to whistle as it falls, so we'll use an ambient_generic (http://collective.valve-erc.com/index.php?ent=ambient_generic) entitiy to play a .wav file. Place the ambient_generic somewhere between the env_shooter and where it hits the ground. Set the message to the .wav file to be played, something like sounds/bombdrop.wav. Set the targetname to bombdrop, the exact same targetname as the env_shooter. This way both of these events will be triggered at the same time. Make sure to check the "Start Silent" and "Not Toggled" flags so the sound isn't played until it's triggered.

Now that the bomb will actually drop in-game, you can play with a few settings for the env_shooter so everything works right. Set the m_iGibs to how many bombs you want dropped, probably 1. Play with the m_flVelocity to set how fast the bomb falls, perhaps something slightly less than your airplane's startspeed. The m_flGibLife is how long the bomb model will be rendered; you need to time how long it takes from when the bomb is dropped to when it hits the ground, and use that number here so the bomb disappears when it hits the ground.

Now you'll create the stuff for the explosion.
Since you've tested how long it takes for the bomb to fall to the ground, build a crater where the bomb has been hitting. Once you've done that, fill in the crater with a brush and turn it into a func_breakable (http://collective.valve-erc.com/index.php?ent=func_breakable&game=dod). Set it's targetname to crater and set the explodemagnitude to however large you want the explosion to be. Make sure to check the "Only Trigger" flag because we don't want the players to be able to shoot the crater and make it blow up.

Now that we have built our crater, we need to trigger it so it will blow up using a trigger_relay (http://collective.valve-erc.com/index.php?ent=trigger_relay). Place the trigger_relay entity somewhere by your env_shooter and set it's targetname to bombdrop, the same as the env_shooter and the ambient_generic; this way all 3 events will be triggered at once. Set the target to be crater, the name of the func_breakable. You'll need to set the delay to be the same as the env_shooter's m_flGibLife; that way the crater will blow up right as the bomb hits the ground.

And that's it! :D

Draft Dodger
01-29-2004, 03:43 PM
The animated model version would be pretty much the same except you would use an animated model rather than the func_tracktrain, path_track, and env_shooter entities.

Trp. Jed
01-29-2004, 03:50 PM
Only problem is that I believe that the model would be rendered client side whereas info about the position of the bomb and anything else falling as part of a train type set-up comes from the server.

Hence, there is a possiblity of lag causing the two to become out of sync with each other.

- Jed

Glidias
02-02-2004, 12:50 AM
Originally posted by Trp. Jed
Only problem is that I believe that the model would be rendered client side whereas info about the position of the bomb and anything else falling as part of a train type set-up comes from the server.

Hence, there is a possiblity of lag causing the two to become out of sync with each other.

- Jed

I'm i'm not wrong, you can create a monster_generic for the model, and trigger a scripted_sequence for the model. There is a model event you can specify in the qc file to trigger a map entity for a partular animation sequence....so just call the scripted_sequence and the plane flies by, triggering a "bombdrop" event at a particular frame in the animation flyby sequence you wish for the bomb to be dropped. ANy entities in yr map with a "bombdrop" name would be triggered. Map trigger events within a .mdl animation would hopefully work on the server-side i guess...Or you could pre-built the animation wit the bomb dropping to the ground and in the frame where the bomb hits the ground, trigger a map event "flybyexplosion1" which targets an env_explosion that exist in yr map.

mXed.dk
02-02-2004, 05:48 AM
can u make it like a mortar field so it random where it hits

Draft Dodger
02-02-2004, 11:30 AM
I think so. Mythic_Kruger made a fun map called blitzkrieg. You can find the release thread here (http://www.dayofdefeat.com/forums/showthread.php?s=&threadid=11451). The map contains moving tanks and a P-51 that does random airstrikes from time to time.

The best thing is---he released the .rmf that shows how he did it! You can download the Hammer file a few posts down on his thread, or there's a direct link here (http://www.dayofdefeat.com/forums/attachment.php?s=&postid=147235).

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.