Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make a door bang when walking into an area?
MissMarilynn Offline
Member

Posts: 77
Threads: 23
Joined: Oct 2011
Reputation: 1
#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
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
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.

Tutorials: From Noob to Pro
(This post was last modified: 10-19-2011, 09:22 PM by Your Computer.)
10-19-2011, 09:21 PM
Website Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#3
RE: How to make a door bang when walking into an area?

Isn't using
SetSwingDoorClosed(string& asName, bool abClosed, bool abEffects); easier?

The Interrogation
Chapter 1

My tutorials
10-19-2011, 09:28 PM
Find
Brute Offline
Member

Posts: 197
Threads: 10
Joined: Aug 2011
Reputation: 3
#4
RE: How to make a door bang when walking into an area?

I also would play a monster sound. Sleep tight... Smile
PlaySoundAtEntity (...)





10-19-2011, 09:31 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
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.

Tutorials: From Noob to Pro
10-19-2011, 11:18 PM
Website Find
MissMarilynn Offline
Member

Posts: 77
Threads: 23
Joined: Oct 2011
Reputation: 1
#6
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
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#7
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.

Tutorials: From Noob to Pro
10-20-2011, 12:08 AM
Website Find
MissMarilynn Offline
Member

Posts: 77
Threads: 23
Joined: Oct 2011
Reputation: 1
#8
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
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#9
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:

PHP Code: (Select All)
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); 

Tutorials: From Noob to Pro
(This post was last modified: 10-20-2011, 12:33 AM by Your Computer.)
10-20-2011, 12:33 AM
Website Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#10
RE: How to make a door bang when walking into an area?

Why shouldn't your computer help user?

The Interrogation
Chapter 1

My tutorials
10-20-2011, 10:19 AM
Find




Users browsing this thread: 1 Guest(s)