Feral Heart
Help & Guidance => Game Help => Topic started by: Windstrider on June 12, 2018, 09:59:18 pm
-
So I got the scrolling codes to work just fine. I know it's possible to 'layer' codes, since I've seen the scroll-and-glow one, but I tried to do a similar thing with scroll-and-translucent and it didn't work. I'm fairly new to coding, so I probably did it wrong lmao, but could someone please tell me the right way to do it? Thanks.
Since this might help, I only want certain parts of the preset to scroll and be translucent. I made only the mane and tail scroll, and that worked totally fine. I assume I can do the same with every other preset 'special effect' code, including translucency.
If whoever answers this needs the preset code, I'll edit this post and add it.
-
By 'translucent' do you mean semi-transparent?
Also, is the scrolling texture meant to show under the transparent areas or not?
-
Yeah, semi-transparent.
And idk if this is even possible but the scrolling texture is supposed to be semi-transparent, so it's almost like a ghost with scrolling effects. But I think it would also be nice to learn how to do a semi-transparent texture with a scrolling one underneath.
-
Try this thread : o
https://feral-heart.com/smf/index.php?topic=5665.0
-
And idk if this is even possible but the scrolling texture is supposed to be semi-transparent, so it's almost like a ghost with scrolling effects. But I think it would also be nice to learn how to do a semi-transparent texture with a scrolling one underneath.
So if I'm understanding right, you want the scrolling texture to actually be the one that's translucent.
For that, you need this code:
material preset_1_bodyMatL
{
technique
{
pass
{
scene_blend alpha_blend
texture_unit
{
texture YOUR TEXTURE.png
scroll_anim 0.1 0.1
}
}
}
}
For a semi-transparent over scrolling texture, this is the code you'd use:
material preset_1_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture SCROLLING TEXTURE.jpg
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture TRANSLUCENT BODY.png
}
}
}
}
-
Ok, thanks guys! Ima go try these out.
Edit:
@Lucius for the first one you posted, does the 'YOUR TEXTURE' part need to be made translucent in GIMP or Photoshop?
-
@Lucius for the first one you posted, does the 'YOUR TEXTURE' part need to be made translucent in GIMP or Photoshop?
Yes it does. Make it as opaque or transparent as you want.
-
Ok, I'll try to make it a lot more translucent then (when it was opaque, and when it was 60% opaque, it didn't appear to change, so maybe it needs to be changed more). Also, does what I name the picture matter? (case-sensitive, etc. I know it's supposed to be png so that's not the issue).
-
Ok, I'll try to make it a lot more translucent then (when it was opaque, and when it was 60% opaque, it didn't appear to change, so maybe it needs to be changed more). Also, does what I name the picture matter? (case-sensitive, etc. I know it's supposed to be png so that's not the issue).
The file name doesn't matter, as long as it's the same as in the material code.
Example: My material file has "YOUR TEXTURE.png", so if I don't change it, then my image name has to be "YOUR TEXTURE.png" as well. If I change the "YOUR TEXTURE.png" to "preset_1body.png", then I'll have to name my image "preset_1body.png".
But I tested the code with a 50% transparency and I noticed a difference, so 60% should look translucent as well. May I take a gander at the rest of your material code?
Edited for clarity.
-
Oml I just realized what my mistake was!! When I got the scrolling codes to work earlier, I made a backup copy of the material file in case the other codes I was doing messed it up somehow, and I think having two of the text files in there (I assumed the 'preset_10 - Copy' would be counted as a different file but I guess not. Ohhh my gawd that explains it x'D Cause just before I was about to put the code in here and post it, I was like wait a minute... -deletes extra material file- -issue solved-
Sorry for any hassle, and thanks!
-
Well, I'm glad it's solved then. Happy preset-making!
And yes, when you have two files that both have the same name in the beginning, then the game just messes up. If you want to keep a backup in the same folder, then put the word COPY in front of the file's original name, not after it.
-
Locking this up now, have fun with your preset!