Strembitsky
Senior Member
Posts: 254
Threads: 37
Joined: Feb 2012
Reputation:
3
|
[Solved] EnableBreakable Function?
I have a window where you can break it, but it is currently set to DisableBreakable. I want it to enable the break-ability after you examine the window first. (I already set up the examine callback)
The Nightmares v1.0 - Dreadful Fires WIP
(This post was last modified: 03-04-2012, 09:07 PM by Strembitsky.)
|
|
03-04-2012, 07:43 PM |
|
JMFStorm
Member
Posts: 205
Threads: 8
Joined: Aug 2011
Reputation:
28
|
RE: EnableBreakable Function?
Im not 100% sure are we talking about the same window entity, but only way to get the window breakable after examination goes something like this: there are three kinds of window entities on this one: "mansionbase_large_window_breakable.ent", "mb_window.ent" and "mb_window_noglass.ent".
You have only the mb_window.ent active first. Your script goes something like this:
void Examination (string &in asEntity)
{
SetEntityActive ("mb_window.ent", false);
SetEntityActive ("mb_window_noglass.ent", true);
SetEntityActive ("mansionbase_large_window_breakable.ent", true);
}
There's a minor visual change in the glass but maybe you just could add there some kind of glass break sound to cover it up.
|
|
03-04-2012, 08:16 PM |
|
Strembitsky
Senior Member
Posts: 254
Threads: 37
Joined: Feb 2012
Reputation:
3
|
RE: EnableBreakable Function?
It worked perfectly, with no awkward visual change. Thanks!
The Nightmares v1.0 - Dreadful Fires WIP
|
|
03-04-2012, 09:07 PM |
|