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 do you make wood bars break when standing on them!
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#1
How do you make wood bars break when standing on them!

This question might not make sense, but it does to me.

If you don't understand, I am trying to make the player when going on the wooden planks/bars it will break and you fall down in a hole. Is there a way to do it. It's similar to penumbra black plague, where you're in the vent and the floor is collapsed and if you walk on it, then it will break and you fall down.

How do I do that, can I do that or is there no such thing to make that? because I've seen people do it in there custom stories, but I forgot what the custom stories where called Sad and I can't find a single way to do that, i can't find a code similar to that or anything. I'm lost help pls
(This post was last modified: 02-12-2014, 01:53 PM by Radical Batz.)
02-12-2014, 01:51 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: How do you make wood bars break when standing on them!

In the most simplest way possible, if you set it up correctly, really all you would need to do is use the SetEntityActive code. HOWEVER, it will look heavily unrealistic. To fix that, you would need to add particle systems, sound effects, broken bits of wood which will fall, etc.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
02-12-2014, 02:02 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#3
RE: How do you make wood bars break when standing on them!

Should I make a script box on the entity that I want it to fall, or I give it a name and then put the setentity active on the script?
02-12-2014, 02:10 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: How do you make wood bars break when standing on them!

You can try using the script SetPropHealth("planks", 0); and it will kill the planks. This only works with entities that have a broken model attached in the entity itself (like doors, the wall passage, boxes). It might work with these planks.

02-12-2014, 02:23 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#5
RE: How do you make wood bars break when standing on them!

actually I don't know if there are wooden planks that can break in amnesia, about do you think it will look realistic with the player walking on doors and then it crashes. while I think of it, I think it is, maybe I can make a collapsed door on the ground and when the player walks on it, it will break.
(This post was last modified: 02-12-2014, 02:39 PM by Radical Batz.)
02-12-2014, 02:39 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#6
RE: How do you make wood bars break when standing on them!

Put the planks on the top of the hole, rotate them and use this script.

PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("Player""PlanksArea_FromLevelEditor""function_name1"true1);
}

void function_name1(string &in asParentstring &in asChildint alState)
{
SetPropHealth("planks_name"0);
PlaySoundAtEntity("""break_wood.snt""Player"0true);

(This post was last modified: 02-12-2014, 06:25 PM by Slanderous.)
02-12-2014, 06:24 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#7
RE: How do you make wood bars break when standing on them!

But I don't even know if there are even planks in the amnesia level editor. is there something else to use if there aren't any planks.
(This post was last modified: 02-12-2014, 06:55 PM by Radical Batz.)
02-12-2014, 06:54 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#8
RE: How do you make wood bars break when standing on them!

Entities>Gameplay>Wooden_boards
02-12-2014, 07:13 PM
Find




Users browsing this thread: 2 Guest(s)