MissMarilynn
Member
Posts: 77
Threads: 23
Joined: Oct 2011
Reputation:
1
|
How to make a door bang when walking into an area?
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.
|
|
10-19-2011, 07:52 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: How to make a door bang when walking into an area?
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.
(This post was last modified: 10-19-2011, 09:22 PM by Your Computer.)
|
|
10-19-2011, 09:21 PM |
|
Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
RE: How to make a door bang when walking into an area?
Isn't using
SetSwingDoorClosed(string& asName, bool abClosed, bool abEffects); easier?
|
|
10-19-2011, 09:28 PM |
|
Brute
Member
Posts: 197
Threads: 10
Joined: Aug 2011
Reputation:
3
|
RE: How to make a door bang when walking into an area?
I also would play a monster sound. Sleep tight...
PlaySoundAtEntity (...)
|
|
10-19-2011, 09:31 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: How to make a door bang when walking into an area?
(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 |
|
MissMarilynn
Member
Posts: 77
Threads: 23
Joined: Oct 2011
Reputation:
1
|
RE: How to make a door bang when walking into an area?
(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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: How to make a door bang when walking into an area?
(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 |
|
MissMarilynn
Member
Posts: 77
Threads: 23
Joined: Oct 2011
Reputation:
1
|
RE: How to make a door bang when walking into an area?
(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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: How to make a door bang when walking into an area?
(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:
AddPropImpulse("door_name", -2, 0, 0, "World"); PlaySoundAtEntity("pound", "hit_wood", "door_name", 0, false); PlaySoundAtEntity("enemy", "L02_attack", "door_name", 0, false); CreateParticleSystemAtEntity("pound_dust", "ps_hit_wood", "door_name", false);
(This post was last modified: 10-20-2011, 12:33 AM by Your Computer.)
|
|
10-20-2011, 12:33 AM |
|
Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
RE: How to make a door bang when walking into an area?
Why shouldn't your computer help user?
|
|
10-20-2011, 10:19 AM |
|
|