Frictional Games Forum (read-only)

Full Version: How to make a door bang when walking into an area?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How can I make a door bang or thump when a person walks into an area? I want it to sound like a monster is on the other side.
Use AddPropImpulse on the door, the impulse having a value of -2. Then you can play the sound "hit_wood" at the door or whatever other sound. Use a timer and local variables if you want to bang the door multiple times.
Isn't using
SetSwingDoorClosed(string& asName, bool abClosed, bool abEffects); easier?
I also would play a monster sound. Sleep tight... Smile
PlaySoundAtEntity (...)
(10-19-2011, 09:28 PM)Elven Wrote: [ -> ]Isn't using
SetSwingDoorClosed(string& asName, bool abClosed, bool abEffects); easier?

AddPropImpulse should bypass any complications brought in by SetSwingDoorClosed.
(10-19-2011, 11:18 PM)Your Computer Wrote: [ -> ]
(10-19-2011, 09:28 PM)Elven Wrote: [ -> ]Isn't using
SetSwingDoorClosed(string& asName, bool abClosed, bool abEffects); easier?

AddPropImpulse should bypass any complications brought in by SetSwingDoorClosed.
Would that make it move a bit without opening as if there was pressure on it? Or make dust come off it like it moved?
(10-19-2011, 11:59 PM)MissMarilynn Wrote: [ -> ]Would that make it move a bit without opening as if there was pressure on it? Or make dust come off it like it moved?

Yeah, and AddPropImpulse should leave the door as it was before the impulse effect once the impulse has finished. The dust, however, will have to be created with CreateParticleSystemAtEntity.
(10-20-2011, 12:08 AM)Your Computer Wrote: [ -> ]
(10-19-2011, 11:59 PM)MissMarilynn Wrote: [ -> ]Would that make it move a bit without opening as if there was pressure on it? Or make dust come off it like it moved?

Yeah, and AddPropImpulse should leave the door as it was before the impulse effect once the impulse has finished. The dust, however, will have to be created with CreateParticleSystemAtEntity.
Mmkay and I was trying to figure that out earlier to. How do I make a particle system start when I walk into an area?

Thanks for responding to all of my threads by the way haha. You've been a great help.
(10-20-2011, 12:12 AM)MissMarilynn Wrote: [ -> ]Mmkay and I was trying to figure that out earlier to. How do I make a particle system start when I walk into an area?

You use AddEntityCollideCallback, provide "Player" for the parent and the area name for the child name, and in the callback call something like:

PHP Code:
AddPropImpulse("door_name", -200"World");
PlaySoundAtEntity("pound""hit_wood""door_name"0false);
PlaySoundAtEntity("enemy""L02_attack""door_name"0false);
CreateParticleSystemAtEntity("pound_dust""ps_hit_wood""door_name"false); 
Why shouldn't your computer help user?
Pages: 1 2