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
Dropping a stone/Something to a (stairs Railings) breaking that thing..
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#1
Dropping a stone/Something to a (stairs Railings) breaking that thing..

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 )
08-23-2014, 09:55 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Dropping a stone/Something to a (stairs Railings) breaking that thing..

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: (Select All)
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.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 08-23-2014, 11:12 PM by Romulator.)
08-23-2014, 11:11 PM
Find




Users browsing this thread: 1 Guest(s)