Page 1 of 3
Windows Tut
Posted: Fri Dec 27, 2002 5:15 pm
by Guest
Was looking for a good breakable windows tut. I found one, but when i tried it two things happend.
1. when i shot the window out it turned yellow and i couldn't see through.
2. i tried placing 2 windows with a gap of 128 between them and the "breakable glass" on the second window shows a yellow face on one side and the normal texture on the other. I see the yellow texure through the regular glass. Hmmmm
Do i need to texture both sides of each window seperately before placing them ontop of each other?
Anyone know where i can find a good tut. Surprised to not see one here.
Posted: Fri Dec 27, 2002 5:20 pm
by jv_map
You need the window texture on both the func_window and the script_object on usually two faces.
Here's a tut but I could have been the one you've read:
http://www.modtheater.com/view.php?page=9
windows tut
Posted: Fri Dec 27, 2002 6:08 pm
by Guest
Hmmm....followed each tut, but still the black square with yellow trim after shooting it.
I'm using the "caulk" texture to create the windows..... is this the correct texture to use? I noticed a window clip under the common textures...not sure what that does.

Posted: Fri Dec 27, 2002 6:15 pm
by jv_map
Use common/nodraw instead of caulk.
Posted: Fri Dec 27, 2002 8:24 pm
by Guest
Great tip....it worked. Thank you so much
Breakable windows
Posted: Sun Jan 26, 2003 3:16 am
by Desert Eagle
looked at the tut recommend above, was wondering if the the key and value had to changed for each windows.
example from tut
func window
KEY: target
VALUE: broken1
script object
KEY: targetname
VALUE: broken1
could this be used for all windows or should each key and value be named differently for each window
ie the second window:
func window
KEY: target1
VALUE: broken2
script object
KEY: target1name
VALUE: broken2
Re: Breakable windows
Posted: Sun Jan 26, 2003 3:25 am
by mohaa_rox
Desert Eagle wrote:
could this be used for all windows or should each key and value be named differently for each window
ie the second window:
func window
KEY: target1
VALUE: broken2
script object
KEY: target1name
VALUE: broken2
You cannot use target1 or targetname1! It's invalid. MoHRadiant doesn't recognise these commands. Instead, put
func window
key: target
value: broken2
script object
key: targetname
value: broken 2
That should fix it.
Posted: Sun Jan 26, 2003 10:10 pm
by wacko
Probably something everybody knew already...
About copying breakable windows: In my mohradiant, the values of the key target of func_window and targetname of the script_object counts up automatically from t1 to t123 (for example). This saves much work!
And about window-texturing: The func_window should have a window-texture like general_structure/window32_frame while the script-object should get a general_structure/window32_broken, so use textures which have both a _frame and a _broken version. This way the window will look broken when shot. Giving the func_window a health of 1 makes it possible to shoot people through still "healthy" windows!!
If you want players to be able to climb through the broken window, UNcheck the box 'WINDOW_BROKEN_BLOCK' in the entity-box (select func_window and hit 'n').
Having done one pair of these window-objects and put them on the same position, you can select both easily by holding SHIFT and clicking twice with the LMB in the 3D-view on it (them).
Posted: Mon Jan 27, 2003 10:27 am
by mohaa_rox
Try using ctrl+space to clone it will same proporties.
Posted: Tue Jan 28, 2003 5:05 am
by Desert Eagle
So you can just copy (clone) each window_func and script_obj into window holes without editing enity info.
So i can make like a dozen breakbale windows without editing each one?
Posted: Tue Jan 28, 2003 7:00 am
by mohaa_rox
Maybe not. 'Cause you see, the target of an unbroken window is "broken", which will be targetname "broken". So a line will connect these 2 together. So if you ctrl+space, everything will be messed up, with arrows all around. This may cause mohaa to crash.
Re: windows tut
Posted: Tue Jan 28, 2003 8:14 am
by TheStorm
Anonymous wrote:Hmmm....followed each tut, but still the black square with yellow trim after shooting it.
I'm using the "caulk" texture to create the windows..... is this the correct texture to use? I noticed a window clip under the common textures...not sure what that does.

The black and yellow textures in game is usual the problem of a texture that doesn't have a proper shader for it or the texture is missing.
You can use caulk on windows but only the sides, on the actual window front and backside you must use the window texture (or window texture on one side and nodraw on the other)
Posted: Tue Jan 28, 2003 8:24 am
by wacko
It works! But this way: Make the two windows with the same size, one as a func_window with texture anything_frame and key/value target/whatuwant, one as a script-object with texture anything-broken and key/value targetname/whatuwant.
The blue arrow should appear between these two! Allign the texture to the windows (CTRL+F) and put them on the same place.
Now select both with SHIFT+2xLBM in 3D-view (Colour of the window in 3dview should turn into a more oblique red than with only one object selected. If this doesn't work, deselect everything and try again) and press SPACE (without CTRL). You'll get a new window-pair, with key/value target/t1 and targetname/t1. Put them in the right place, press SPACE and you'll get a new window-pair, with key/value target/t2 and targetname/t2. Put them in the right place, press SPACE and so on...
Posted: Tue Jan 28, 2003 8:32 am
by mohaa_rox
Ok, that's good.
Posted: Tue Jan 28, 2003 4:10 pm
by Desert Eagle
Sweet works perfect....now I can make windows fast. Thanks Wacko and mohaa_rox. I am trying to keep track of everyone that helps....so I can give credit in my custom map.