Windows Tut

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Guest

Windows Tut

Post 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.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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
Image
Guest

windows tut

Post 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.

:cry:
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Use common/nodraw instead of caulk.
Image
Guest

Post by Guest »

Great tip....it worked. Thank you so much
Desert Eagle
Captain
Posts: 237
Joined: Mon Jan 13, 2003 1:05 am
Location: Mapping Bunker
Contact:

Breakable windows

Post 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
Desert-Eagle
....The Eagle Has Landed...
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Re: Breakable windows

Post 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.
Live to map, not map to live.
-mohaa_rox, .map
moderator
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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).
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

Try using ctrl+space to clone it will same proporties.
Live to map, not map to live.
-mohaa_rox, .map
moderator
Desert Eagle
Captain
Posts: 237
Joined: Mon Jan 13, 2003 1:05 am
Location: Mapping Bunker
Contact:

Post 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?
Desert-Eagle
....The Eagle Has Landed...
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post 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.
Live to map, not map to live.
-mohaa_rox, .map
moderator
TheStorm
Captain
Posts: 233
Joined: Mon Oct 07, 2002 7:45 am
Location: Gavle, Sweden
Contact:

Re: windows tut

Post 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.

:cry:


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)
TMT admin, visit www.modtheater.com
HITP Lead Mapper
Member of Electronic Arts MOHteam
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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...
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

Ok, that's good.
Live to map, not map to live.
-mohaa_rox, .map
moderator
Desert Eagle
Captain
Posts: 237
Joined: Mon Jan 13, 2003 1:05 am
Location: Mapping Bunker
Contact:

Post 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.
Desert-Eagle
....The Eagle Has Landed...
Post Reply