This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "Linkmaterial"

From BZFlagWiki
Jump to: navigation, search
(First Addition of LinkMaterial page. Includes generic teleporter dyncol and texmat. Probably my best wiki edit ever. Can't get the page title to use a capital M in LinkMaterial, like it should be.)
 
(added wiki table)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
LinkMaterial allows you to set the texture of the teleporter window to anything you would like it to be.  
+
[[Linkmaterial|LinkMaterial]] allows you to set the texture of the teleporter window to anything you would like it to be.  
  
==Code==
+
==Properties==
To utilize LinkMaterial in your map, first it must be defined:
+
Valid parameters for a LinkMaterial are:
{|
+
{|{{Prettytable}}
|
+
|-
material
+
| {{Hl3}} |'''Parameter'''
  name LinkMaterial
+
| {{Hl3}} |'''Description'''
  texture ''<file name>''
+
|-
end
+
| '''name''' || LinkMaterial.
 +
|-
 +
| '''texture''' || Set the texture (must be .png but don't include the extension unless on the Internet).
 +
|-
 +
| '''addtexture''' || Add a texture (again, no extension is needed).
 +
|-
 +
| '''notextures''' || Don't use textures.
 +
|-
 +
| '''notexcolor''' || Don't apply the [[Color(BZW)|color]] to the texture.
 +
|-
 +
| '''notexalpha''' || Don't use the texture's alpha channel.
 +
|-
 +
| '''texmat''' || Specify a [[TextureMatrix|texture matrix]]. -1 for no texture matrix. (addtexture must be used before texmat).
 +
|-
 +
| '''dyncol''' || Specify a [[DynamicColor|dynamic color]]. -1 for no dynamic color.
 +
|-
 +
| '''ambient''' || Ambient color.
 +
|-
 +
| '''diffuse''' || Diffuse (main)[[Color(BZW)|color]].
 +
|-
 +
| '''[[Color(BZW)|color]]''' || Synonym for diffuse.
 +
|-
 +
| '''specular''' || Specular [[Color(BZW)|color]].
 +
|-
 +
| '''emission''' || Emission [[Color(BZW)|color]].
 +
|-
 +
| '''shininess''' || Shiny!.
 +
|-
 +
| '''resetmat''' || Restore default values.
 
|}
 
|}
valid parameters for a Material are:
 
<properties>
 
name=name used to define that its a GroundMaterial
 
texture=set the texture (must be .png but don't include the extension)
 
</properties>
 
  
 
==Code==
 
==Code==
Line 21: Line 44:
 
  #The Generic Teleporter Material
 
  #The Generic Teleporter Material
 
  dynamicColor
 
  dynamicColor
   name LinkMaterial
+
   name Linkdyncol
 
   red limits 0 0.25
 
   red limits 0 0.25
 
   red sinusoid 2 0 1
 
   red sinusoid 2 0 1
Line 31: Line 54:
 
  end
 
  end
 
  textureMatrix
 
  textureMatrix
   name LinkMaterial
+
   name Linktexmat
 
   shift 0 -0.05  
 
   shift 0 -0.05  
 
  end
 
  end
 
  material
 
  material
 
   name LinkMaterial
 
   name LinkMaterial
   dyncol LinkMaterial
+
   dyncol Linkdyncol
 
   diffuse 0 0 0 0.5
 
   diffuse 0 0 0 0.5
 
   nolighting
 
   nolighting
 
   addtexture telelink
 
   addtexture telelink
   texmat LinkMaterial
+
   texmat Linktexmat
 
  end
 
  end
 
|}
 
|}
 +
 +
=Hints=
 +
Nolighting is almost always a preferred option in a LinkMaterial.
 +
 +
 +
[[Category:Map Making]]
 +
[[Category:Map Objects]]

Latest revision as of 16:29, 8 February 2017

LinkMaterial allows you to set the texture of the teleporter window to anything you would like it to be.

Properties[edit]

Valid parameters for a LinkMaterial are:

Parameter Description
name LinkMaterial.
texture Set the texture (must be .png but don't include the extension unless on the Internet).
addtexture Add a texture (again, no extension is needed).
notextures Don't use textures.
notexcolor Don't apply the color to the texture.
notexalpha Don't use the texture's alpha channel.
texmat Specify a texture matrix. -1 for no texture matrix. (addtexture must be used before texmat).
dyncol Specify a dynamic color. -1 for no dynamic color.
ambient Ambient color.
diffuse Diffuse (main)color.
color Synonym for diffuse.
specular Specular color.
emission Emission color.
shininess Shiny!.
resetmat Restore default values.

Code[edit]

#The Generic Teleporter Material
dynamicColor
  name Linkdyncol
  red limits 0 0.25
  red sinusoid 2 0 1
  green limits 0 0.25
  green sinusoid 2 0.666667 1
  blue limits 0 0.25
  blue sinusoid 2 1.33333 1
  alpha limits 0.75 0.75
end
textureMatrix
  name Linktexmat
  shift 0 -0.05 
end
material
  name LinkMaterial
  dyncol Linkdyncol
  diffuse 0 0 0 0.5
  nolighting
  addtexture telelink
  texmat Linktexmat
end

Hints[edit]

Nolighting is almost always a preferred option in a LinkMaterial.