Windows Tut
Moderator: Moderators
-
Guest
Windows Tut
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.
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.
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
Here's a tut but I could have been the one you've read:
http://www.modtheater.com/view.php?page=9
-
Guest
windows tut
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.

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.
-
Desert Eagle
- Captain
- Posts: 237
- Joined: Mon Jan 13, 2003 1:05 am
- Location: Mapping Bunker
- Contact:
Breakable windows
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
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
Desert-Eagle
....The Eagle Has Landed...
....The Eagle Has Landed...
Re: Breakable windows
You cannot use target1 or targetname1! It's invalid. MoHRadiant doesn't recognise these commands. Instead, putDesert 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
func window
key: target
value: broken2
script object
key: targetname
value: broken 2
That should fix it.
Live to map, not map to live.
-mohaa_rox, .map
moderator
-mohaa_rox, .map
moderator
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).
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).
-
Desert Eagle
- Captain
- Posts: 237
- Joined: Mon Jan 13, 2003 1:05 am
- Location: Mapping Bunker
- Contact:
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.
Live to map, not map to live.
-mohaa_rox, .map
moderator
-mohaa_rox, .map
moderator
Re: windows tut
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.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.
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)
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...
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...
-
Desert Eagle
- Captain
- Posts: 237
- Joined: Mon Jan 13, 2003 1:05 am
- Location: Mapping Bunker
- Contact:
