Jump to content


Photo

Sprite Color Altering,


  • Please log in to reply
5 replies to this topic

#1 worthikids

worthikids

    GMC Member

  • GMC Member
  • 155 posts

Posted 09 January 2010 - 06:55 PM

I have a collection of sprites, with the skin areas bucket filled yellow.
Here's an example-
Posted Image
Note nothing else on the sprite is yellow, just the skin areas.
This body sprite will get a different head depending on what character the player picks.
And each character will have a variable containing the skin tone of the character's head.
So after the player picks their character, the game will take a few loading seconds to change the yellow on all of the body sprites, to the skin tone value from earlier.
What's the name of the script that changes one color on a sprite to another?
That's my question,
Double check that you understand it, than please reply.
  • 0

#2 Davve

Davve

    Procrastinator

  • GMC Member
  • 3665 posts
  • Version:GM8.1

Posted 09 January 2010 - 06:58 PM

Use this script.
  • 0

#3 worthikids

worthikids

    GMC Member

  • GMC Member
  • 155 posts

Posted 09 January 2010 - 07:37 PM

Use this script.

*looks at script*
Geez that's sweet!!
I knew I'd seen the script before but I couldn't remember where.
GMLscripts, duh! That place rulez!
Thank you and good bye!
  • 0

#4 worthikids

worthikids

    GMC Member

  • GMC Member
  • 155 posts

Posted 09 January 2010 - 07:47 PM

PHOOIE! it's not compatible with GM 8. ;)
  • 0

#5 Carnivac

Carnivac

    The Hunter

  • GMC Member
  • 2108 posts
  • Version:GM8.1

Posted 09 January 2010 - 07:52 PM

So make it compatible. It's likely the sprite_create and surface_create commands have two too many arguments in them as they changed slightly in GM8. Knock the last two out. Might work. Check the GM8 manual to see how many they should have to be sure. If I had time I'd give it a go myself.

Edited by Carnivac, 09 January 2010 - 07:52 PM.

  • 0

#6 EneilShade

EneilShade

    GMC Member

  • New Member
  • 54 posts

Posted 09 January 2010 - 07:55 PM

Or, you could change the yellow areas to white, and then use image_blend to change the color of the white, but only if you have Pro.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users