The Daily Click ::. Forums ::. Klik Coding Help ::. Replace Color...
 

Post Reply  Post Oekaki 
 

Posted By Message

Nicholas Wilson



Registered
  11/10/2003
Points
  5
12th October, 2003 at 20:29:18 -

The game mentioned here originated in MMF 1.2 and is now being made in 1.5 (Build 113).

I recently handed out a copy of my WIP to a friend to be sure it would work on another PC.

Both PCs are using Windows XP, but for some reason the color change isn't happening on her PC. The value that stores whether or not to make the color change (a global variable named "Blonde" ) is responding to the events it's supposed to, but for some reason the color replacement isn't taking place whatsoever.

We've been testing it for the past hour or so, I have tried to keep all her files up to date so they'd be compatible with mine but I guess something could have been lost in the process...

As it now stands Link (it's a Zelda game) will not change his colors as he's told, and I don't know if it's because

- replace color has something inside of it that is system-dependent and not guaranteed to work universally (I hope not)
- her .dlls (or some other file) are out of date (I updated the 4 c*.dlls in windows/system, with copies of my own)

Because other than external files our games are identical; I don't know how hers could possibly be messing up... I have yet to test it on our other machines.

Does anyone have any idea what is going on here and if it's something I can fix?

 
n/a

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
13th October, 2003 at 03:43:18 -

Clickteam's support forum is your best bet in fixing this, since they're the guys who built it, and so they're more likely to know about inherent flaws in it than we are.

However, I have experienced various problems with it before. It's important to use the 'get pixel' expression to retrieve the colour to replace. This means it will work no matter what colour the object has been changed into. I personally can't think of anything else you can do.

Is the game an online one, where both PCs connect, or are they standalone?

 
191 / 9999 * 7 + 191 * 7

Nicholas Wilson



Registered
  11/10/2003
Points
  5
13th October, 2003 at 09:46:55 -

The game is standalone, I have thought about some online applications but I'm retracting that thought after so many problems with the replace color object.

You're saying that from computer to computer the color may be drawn differently so I'm going to have to use the get pixel command to guarantee that the color to be replaced is picked up on? That makes a lot of sense I'll see what I can do! Where do I use the getpixel command? I can't seem to find it...

(by the way I have posted a similar topic on the Clickteam boards, unfortunately it's having a hard time garnering replies because I managed to confuse the admins by listing multiple problems within the object.

Thank you; I'll let ya know if it works out.

Image Edited by the Author.

 
n/a

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
13th October, 2003 at 09:53:12 -

the pixel object is probably device-dependant, so try fiddling with the different graphics-related options.

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Nicholas Wilson



Registered
  11/10/2003
Points
  5
13th October, 2003 at 09:55:36 -

Ok nevermind I found the Get RGB value thing...

I hope this works, such a miniscule problem yet it drives me insane.

 
n/a

MidnighT_RaveN



Registered
  20/09/2003
Points
  86
13th October, 2003 at 19:07:31 -

yeah, they'll do that to ya..

 
n/a

MidnighT_RaveN



Registered
  20/09/2003
Points
  86
13th October, 2003 at 19:12:05 -

yeah, they'll do that to ya..

 
n/a

Nicholas Wilson



Registered
  11/10/2003
Points
  5
13th October, 2003 at 19:25:35 -

Sure enough the GetRGB command works wonders for it; I'm just lucky the two colors I'm changing have common pixels in all 4 initial directions of the object

For future reference however... I think the problem is something inherent in all computers and having to do with the "web safe" color palette. If you use all non-dithering hues for colors you're going to change you shouldn't have a problem from computer to computer; otherwise you're gonna get stuck using the GetRGB command.

Let this be a lesson to us all.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click