Frictional Games Forum (read-only)

Full Version: Help with a breaking door?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering the void command to be able to break a door? So that it feels like there is a monster there ,but there isnt? Sort like in this video at 6:30:

http://www.youtube.com/watch?v=QvmTX5hWb...ature=plcp



I want something similar to that.

THANK YOU!
Well, in the video you provided the door isn't breaking, but instead it is an effect made by using prop force, sound effects, and particle systems. To actually break a door, the function is "SetPropHealth", and you can set a props health to 0 (zero) to destroy it. Here's the complete function for prop health:

SetPropHealth(string& asName, float afHealth);


(string &in asName) = "NAMEOFOBJECT"
(float afHealth) = The float (decimal amount) of health to set it to.


On the other hand, to make the effect in the video, you will need the following functions:

AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);


PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);


CreateParticleSystemAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS);


In the level editor, create a small script area (roughly 0.5/0.5/0.5) and place it in the center of the door. Use play sound at entity to play a wood breaking sound at the area, create a particle system at the area, and use the prop force function to push on the door, giving it the effect that someone's banging on it from the other side!

Hope the helped.
(06-28-2012, 12:41 PM)andyrockin123 Wrote: [ -> ]Well, in the video you provided the door isn't breaking, but instead it is an effect made by using prop force, sound effects, and particle systems. To actually break a door, the function is "SetPropHealth", and you can set a props health to 0 (zero) to destroy it. Here's the complete function for prop health:

SetPropHealth(string& asName, float afHealth);


(string &in asName) = "NAMEOFOBJECT"
(float afHealth) = The float (decimal amount) of health to set it to.


On the other hand, to make the effect in the video, you will need the following functions:

AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);


PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);


CreateParticleSystemAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS);


In the level editor, create a small script area (roughly 0.5/0.5/0.5) and place it in the center of the door. Use play sound at entity to play a wood breaking sound at the area, create a particle system at the area, and use the prop force function to push on the door, giving it the effect that someone's banging on it from the other side!

Hope the helped.
Well how will the prop force work? Prop forces are used to move the prop the door was still closed.
Just like when a door is locked and the player interacts with it, there is a bit of "give" to the door where it can move back and forth, but only slightly. This is because the door is considered closed and won't extend past a certain point. Even if it is not locked and prop force is applied it will move just enough to make the effect look good.

Prop force isn't like player interaction; using prop force won't actually open a door. Only additional scripting, or actual player interaction can achieve that.
Sure thing, where do you live? i can bring my axe with me. It's huge!
(06-28-2012, 01:02 PM)CrazyArts Wrote: [ -> ]Sure thing, where do you live? i can bring my axe with me. It's huge!
52 cauliflower lane, Beverly hills, California

Look it up on Google Maps.