Frictional Games Forum (read-only)
[Solved] EnableBreakable Function? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [Solved] EnableBreakable Function? (/thread-13755.html)



[Solved] EnableBreakable Function? - Strembitsky - 03-04-2012

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)


RE: EnableBreakable Function? - JMFStorm - 03-04-2012

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.



RE: EnableBreakable Function? - Strembitsky - 03-04-2012

It worked perfectly, with no awkward visual change. Thanks!