Frictional Games Forum (read-only)

Full Version: Dropping a stone/Something to a (stairs Railings) breaking that thing..
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello Big Grin
i forgot how to make it possible , to drop a Stone to Some (that Stair Railings thing) and it will break... (yes i did that railling)
can someone help me ?!
i forgot the scripts and didn't find it...
( not 1 railling breaks but 2/3 )
IIRC, the railings do not have a "breaking" entity, so no animation will play, thus we do not use SetPropHealth().

You should know you're working with an AddEntityCollideCallback here. One between the Rock (parent) and the railing. (Child). It will happen when they hit, so the alState will be 1, and it will happen only once, so the boolean is true.

In your callback void, you'll have to use this, as the railings are static objects.
PHP Code:
SetPropActiveAndFade("<railing_name>"false0.5f); 

That is the most basic way to do it. The thing is, I can script this for you, but it's a learning experience, and this is rather basic. I have enough information there for you to be able to do it on your own, but of you're still having trouble, let us know.