Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
So, I thought that having at least some not-so blood in my game would be cool. And while I was able to make it "spill" from center, I stumbled upon a problem. To make blood disappear, I wanted to use "Transparent (add)" along with making vertex color darker, which results in it fading away, going from "0x77404040" to "0x77000000". However, I don't quite understand how to "fade" HTML (HEX) colors. Tried searching it up online, but was unable to find an actual solution (or something that would work, actually). "Blood" would straight up disappear. From what I know, I can use "parseInt ([number], 16)" or something with ".toString ()", but nothing more, really. Also found something which I can't quite understand, but, perhaps, a possibly helpful thing in "FadeScreen" behavior: var color = (alpha<<24) | (me.Color & 0x00ffffff);Is there any known solution to this? |
||||
|
Perhaps I’m jumping to conclusions, but I advise you to try fade 3d object action |
||||
|
You can try looking at my shader actions there is code to convert colors into RGB along with alpha value as well, also you can change the value of 77 to something else in order to change the alpha of your color. There is also a page on neophyte.cf website regarding color conversion. https://vazahat.github.io/CS_col... If you wanna fade an object completely then you can download the fade-in fade-out shader extension of mine. If you are dealing with vertex alpha colors, then you can also use the material type for the vertex alpha. Hope that helps. |
||||
|
writer, I have no idea what is "fade 3d object" action, since I couldn't find it in standard coppercube actions. Is it some custom downloadable action? just_in_case, this actually was quite helpful, thanks a lot. Though I did not use shaders, but the whole explanation to the color conversion... It did end up being useful. At least now I understand what this weird line of code from "FadeScreen" action was. In the end, I got this code: if (t > 10000)Works well for me. Even though I can't use lighting with it (dynamic lighting affects vertex colors, I guess), most rooms are pretty lit up, so it shouldn't be a problem. yeah, when I said "not-so blood", I meant that
|
||||
|
|