how to make a box be a certain color
how to make a box be a certain color
i want to make a box red and another box green but i dont know how to do it,can someone help
"See a need fill a need"-(Bigweld from the movie "Robots")
-
- Private First Class
- Posts: 220
- Joined: Tue Jul 26, 2005 10:32 pm
- Location: Gainesville Florida
Re: how to make a box be a certain color
here are two ways to make colored boxes
1. create materials that are the colors you want and apply them to the boxes or whatever objects you want.
2. another way is to "tint" a meshbox. Tinting will shade the box texture a certain color.
You probably should have posted this in the "Help: Map Making" section.
Code: Select all
## first method using materials
material
name red
diffuse 1 0 0 1
end
material
name green
diffuse 0 1 0 1
end
box
position -100 0 0
size 20 20 20
matref red
end
box
position 100 0 0
size 20 20 20
matref green
end
## second method using 'tint' keyword
define colored_box
meshbox
size 20 20 20
end
enddef
group colored_box # red box
tint 1 0 0 1
shift 0 -100 0
end
group colored_box # green box
tint 0 1 0 1
shift 0 100 0
end
1. create materials that are the colors you want and apply them to the boxes or whatever objects you want.
2. another way is to "tint" a meshbox. Tinting will shade the box texture a certain color.
You probably should have posted this in the "Help: Map Making" section.
Re: how to make a box be a certain color
(Moved to the proper forum)
You should also be able to use named colors instead of providing 4 numbers.
BZFlag Wiki - Color(BZW)
You should also be able to use named colors instead of providing 4 numbers.
BZFlag Wiki - Color(BZW)
Re: how to make a box be a certain color
How do you apply that material that you put at the top of the page to a box
"See a need fill a need"-(Bigweld from the movie "Robots")
Re: how to make a box be a certain color
Look at ALL the code provided. It is a complete example...
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
- optic delusion
- Special Forces
- Posts: 1054
- Joined: Sat Sep 25, 2004 2:29 pm
- Location: Planet MoFo
- Contact:
Re: how to make a box be a certain color
Take a look at my Defender game mode concept.
Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
Re: how to make a box be a certain color
how do you make it see through
"See a need fill a need"-(Bigweld from the movie "Robots")
Re: how to make a box be a certain color
if you want a transparent box, you would add this to the mesh box:enrico123 wrote:how do you make it see through
Code: Select all
addtexture boxwall
diffuse 1 1 1 0.5
if you wanted for example, a transparent pyramid, you would do this:
Code: Select all
pyramid
position 0 0 0
size 10 10 10
rotation 0
diffuse 1 1 1 0.5
addtexture pyrawall
end
hope this helps