After much experimentation I have created a window, with glass, that can be opened or smashed. Here is how I did it. Video attached.
To make your window
Square: I used 6 pieces of rope in the traditional square with a cross window design. Glue the frame together.
Circular: Use Ancient Stone Ring. With or without rope cross in the center.
Attach the Drop Shadow – Transparent fx (rotated vertically). It can only be circular but will fit okay into the square window (make it a little bit bigger than the frame). Tint the fx (I like a greenish blue).
To make your hinge
Place a cylinder. Attach window to cylinder where the window hinge will be.
Window that opens on interaction
- WHEN [interacted] DO [owner][power on]
- …WHEN DO [switch page]
- WHEN [has power]
- …WHEN [duration timer][in frames] DO [turn][angle]
- …WHEN [countdown timer][in frames] DO [power off]
Window that can be smashed
- WHEN[started to] [hit by attack] DO
- …WHEN DO [play sound][sound fx][Explosion Glass Debris][everywhere]
- …WHEN DO [destroy][IWP:Fx Gizmo (the drop shadow)]
You can also change the look of the window after it is smashed by attaching another glued window design and placing some glass on the floor (use ice platform). Toggle the visibility on each to get the effect.
7. …WHEN DO [IWP: window][visibility][equals][false]
8. …WHEN DO [IWP: broken window][visibility][equals][true]
9. …WHEN DO [IWP: broken glass][visibiity][equals][true]
In this scenario, one hit will smash the window. You could change it based on a health value or number of hits just as easily. You can combine the two codes in one brain so you can open or smash, and also open the smashed window.