Feral Heart
Help & Guidance => Game Help => Topic started by: FlyingGrass on September 08, 2017, 01:35:11 pm
-
I'm putting a new code in Gui's preset, but the layer I'm coding is only yellow-black stripes.
Below is part of the body's code. The code for the layer that should move with the view is at the top of this code.
material preset_1_bodyMatL
{
receive_shadows on
technique
{
pass
{
ambient 0.5 0.5 0.5
specular 1.0 1.0 1.0 128
emissive 1.0 1.0 1.0
cull_hardware none
cull_software none
scene_blend alpha_blend
alpha_rejection greater_equal 128
texture_unit
{
env_map spherical
texture cursortex.jpg
}
}
pass
{
ambient 0.5 0.5 0.5
diffuse 1.000000 1.000000 1.000000 1.000000
specular 0.010000 0.010000 0.010000 1.000000
emissive 0.000000 0.000000 0.000000 1.000000
texture_unit
{
texture presetGuibodyLTFT.png
tex_address_mode wrap
filtering trilinear
colour_op alpha_blend
}
}
The yellow-black stripes are happening on both sides, but that code works perfectly on the tail, it must be the code for the body layer.
I did remove the scrolling texture from the body.
The cursortex is being used to test the code before I create a texture for that layer.
There are no uppercase letters in the image name, and the image is a jpg.
The yellow-black stripes move with the view.
Screenshot:(https://i.imgur.com/5mB4aPk.png)The tail and body share the exact same layer, and the tail is working.
I've tried typing .jpeg as well, it didn't solve the problem.
I checked the spelling of everything.
-
You're missing the two last closing brackets. Try this code:
material preset_1_bodyMatL
{
receive_shadows on
technique
{
pass
{
ambient 0.5 0.5 0.5
specular 1.0 1.0 1.0 128
emissive 1.0 1.0 1.0
cull_hardware none
cull_software none
scene_blend alpha_blend
alpha_rejection greater_equal 128
texture_unit
{
env_map spherical
texture cursortex.jpg
}
}
pass
{
ambient 0.5 0.5 0.5
diffuse 1.000000 1.000000 1.000000 1.000000
specular 0.010000 0.010000 0.010000 1.000000
emissive 0.000000 0.000000 0.000000 1.000000
texture_unit
{
texture presetGuibodyLTFT.png
tex_address_mode wrap
filtering trilinear
colour_op alpha_blend
}
}
}
}
Remember, for every opening bracket ({), you need a closing one (}). Otherwise the game expects more lines and never registers that the section is finished.
-
You're missing the two last closing brackets. Try this code:
material preset_1_bodyMatL
{
receive_shadows on
technique
{
pass
{
ambient 0.5 0.5 0.5
specular 1.0 1.0 1.0 128
emissive 1.0 1.0 1.0
cull_hardware none
cull_software none
scene_blend alpha_blend
alpha_rejection greater_equal 128
texture_unit
{
env_map spherical
texture cursortex.jpg
}
}
pass
{
ambient 0.5 0.5 0.5
diffuse 1.000000 1.000000 1.000000 1.000000
specular 0.010000 0.010000 0.010000 1.000000
emissive 0.000000 0.000000 0.000000 1.000000
texture_unit
{
texture presetGuibodyLTFT.png
tex_address_mode wrap
filtering trilinear
colour_op alpha_blend
}
}
}
}
Remember, for every opening bracket ({), you need a closing one (}). Otherwise the game expects more lines and never registers that the section is finished.
Those two closing brackets didn't fix the problem, the other layers have this same bracket setup until the end of the section.
I forgot to post the "Pass" line in the code. there are more layers below that have worked fine with the layers above them. If the brackets were a problem then I would be seeing a white blob instead of the preset's body.
I've posted a screenshot. The tail works with the moving layer code,. yet the body code might be obstructing the bottom layer somehow. I did just remove a code from the body layer that adds a scrolling texture under the body layer.
-
Apologies, my reply was posted before you added your screenshot, so I assumed that you saw the entire thing as yellow and black.
I can't help you much then, other than maybe suggesting you copy the cursortex into your preset folder if it's not there already.
-
Apologies, my reply was posted before you added your screenshot, so I assumed that you saw the entire thing as yellow and black.
I can't help you much then, other than maybe suggesting you copy the cursortex into your preset folder if it's not there already.
It is in the preset folder, the layer is working on the tail but the body is not showing the texture.
I apologise for editing my posts in this topic so much, I keep wondering if I've been specific enough.
-
I have fixed it by adding the transparency lines to the body code. The spherical env-map applied to the yellow-black stripes made me think it wasn't the lack of transparency lines.
Let this be a reminder to everyone, that adding the transparency lines is a must for adding a layer below what was once the scrolling code.
This can be locked, sorry if I bothered anyone.
-
Locking this as the issue has been solved c: