You are not logged in.
Okay guys :), today I found a problem with a script that I needed, so here's this script :
http://www.gmlscripts.com/script/sprite_replace_color
I posted a comment showing that I had an error, so to recap I get this happening :
http://img5.imageshack.us/img5/3862/5lil.png
I get as an answer to check if the sprite was Fully Black, which I did before posting my first comment in fact ;)
But this was a good idea in fact, so I re-checked it, and RGB color for the sprite is #000000 for all the sprite.
I was told to add more info, but I don't know what I can tell you more, if it's not the code in the object (script is exactly the same) :
In step event for the player (object called objectCharacter) :
sprite_replace_color(spriteCharacter,c_black,c_aqua)
Offline
I need to see a simple *.gmk project that demonstrates the problem. As I said in the comment, the black portions of the sprite that do not change are not #000000 in your image. I want to know what could be causing that. It's very strange.
Abusing forum power since 1986.
Offline
Okay, I'm at school now, so Imma upload it for you this evening ;P
Offline
Okay, so now I have the file !
Get in from my DropBox now : https://www.dropbox.com/s/v1igub18ccem7 … _color.gmk
Edit : now it recolors the full sprite into transparent one
Last edited by NervaL928 (2013-11-13 14:40:03)
Offline
The main problem is the sprite is not entirely black.
The black areas are #000000, the blue areas are #010101, the red areas are #020202
GM8's sprite editor may have mislead you. I've noticed that the color tolerance controls don't work as expected and the magic wand and bucket fill tools don't reveal the problem. If you use the color picker tool on the marked areas, you can see their real color values in the color selection dialog.
There are a couple of usage problems as well, which should be better explained in the script.
First, this script should not be used in the draw event. This is because it has to draw to a surface to work.
You should never change the drawing target while you are actually drawing on the screen, that is, never use it in drawing events. This will cause serious problems with the projection and viewport.
Second, this script should only be run once per color replacement. Since it changes the sprite permanently, there is no reason to run it again. It's a relatively slow script and there may be a chance the sprite could degrade after many copies. I believe I've fixed the degradation problem but it was an issue in the past.
Abusing forum power since 1986.
Offline