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
Setting an entity unbreakable
Melvin Offline
Member

Posts: 245
Threads: 38
Joined: Jun 2012
Reputation: 5
#1
Setting an entity unbreakable

I want to make a bottle (in this case a wine bottle) unbreakable. I did this by checking the unbreakable box. Now, if I throw this bottle on the ground, you hear a quick hit and then it disappears.

How can I fix the disappearance?

[Image: 25F7U37.png]
08-22-2012, 07:19 PM
Website Find Reply
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#2
RE: Setting an entity unbreakable

(08-22-2012, 07:19 PM)SmokeMelvin Wrote: I want to make a bottle (in this case a wine bottle) unbreakable. I did this by checking the unbreakable box. Now, if I throw this bottle on the ground, you hear a quick hit and then it disappears.

How can I fix the disappearance?
This works on doors, but I never tested on bottles. Maybe it is supposed to be that way? I'll test it quickly.

EDIT: Tested it out. Exactly like you explained. Try using a script that makes the bottle's health like "99999". It is the "SetPropHealth" if I remember correctly.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
(This post was last modified: 08-22-2012, 07:29 PM by Robby.)
08-22-2012, 07:24 PM
Website Find Reply
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#3
RE: Setting an entity unbreakable

If you plan on having multiple bottles, the best way is just to make a custom entity.
To do this, open up the bottle's .ent file in the model editor, and use save-as to make a copy with a different name (It might be worth making a folder called Custom in your entities folder to put your custom entities in, so that you can just copy this into your CS entities folder when you are ready to release the story).
Now you are working on a copy, go to settings->user defined variables and scroll down to you see the checkbox that says "BreakActive". Uncheck this box and save your entity.

You can then navigate to your custom folder in the level editor to place your custom bottle prop which won't break.
(This post was last modified: 08-22-2012, 08:50 PM by Apjjm.)
08-22-2012, 08:49 PM
Find Reply
Melvin Offline
Member

Posts: 245
Threads: 38
Joined: Jun 2012
Reputation: 5
#4
RE: Setting an entity unbreakable

Thanks for the reply. I've tried to set the SetPropHealth to 99999 but still... The bottle disappears after I throw it on the ground, or to the wall/ceiling.

Its like they go into the wall or something..

(08-22-2012, 08:49 PM)Apjjm Wrote: If you plan on having multiple bottles, the best way is just to make a custom entity.
To do this, open up the bottle's .ent file in the model editor, and use save-as to make a copy with a different name (It might be worth making a folder called Custom in your entities folder to put your custom entities in, so that you can just copy this into your CS entities folder when you are ready to release the story).
Now you are working on a copy, go to settings->user defined variables and scroll down to you see the checkbox that says "BreakActive". Uncheck this box and save your entity.

You can then navigate to your custom folder in the level editor to place your custom bottle prop which won't break.



Thanks man it worked! Man, didn't know it had to go so far just to not let the bottle break!

[Image: 25F7U37.png]
(This post was last modified: 08-22-2012, 08:57 PM by Melvin.)
08-22-2012, 08:52 PM
Website Find Reply




Users browsing this thread: 1 Guest(s)