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

Post Reply  Post Oekaki 
 

Posted By Message

Fish20



Registered
  03/12/2007
Points
  263

VIP MemberPS3 OwnerI like Aliens!I'm a Storm TrooperIt's-a me, Mario!I am an April FoolPicture Me This Round 48 Winner!
28th November, 2010 at 02:42:17 -

Can someone link me to an extension that changes the colors of an active ocject based on what the player picks. Example: Player picks red, block is red. Player picks blue, block turns blue. The block also has multiple animations that also turn blue in those.

 
All your base are in another castle, take this.

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
28th November, 2010 at 02:48:59 -

why extension? just have a global value and seperate actives. You can have it so that the active you play as changes depending on the global value

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

HorrendousGames

Sourpuss

Registered
  31/10/2009
Points
  481

VIP MemberEvil klikerGame Of The Week Winner
28th November, 2010 at 03:12:59 -

I take it his point is to not have separate actives, and saving space, also it saves a lot of time. I don't understand what people have against extensions, unless you're doing a flash runtime, you shouldn't worry about it.

There was a thread about this not too long ago where I gave an answer to this question, although it wasn't the best, I don't think anyone else answered the question, and my answer still used a separate active, albeit would save from having several different actives for simple color changes.

 
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!

http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942

http://www.create-games.com/project.asp?view=main&id=2160

MasterM



Registered
  02/01/2002
Points
  701

I am an April Fool
28th November, 2010 at 12:04:28 -

note: MMF's change colour will slow down your game like hell if you export to SWF.

no thx to dickteam for not fixing this and not even telling you it won't work.

 
Image

Fish20



Registered
  03/12/2007
Points
  263

VIP MemberPS3 OwnerI like Aliens!I'm a Storm TrooperIt's-a me, Mario!I am an April FoolPicture Me This Round 48 Winner!
29th November, 2010 at 03:54:23 -

I'm not exporting to SWF. I will not use separate actives because then I must change ALL my code which will take a long time.

 
All your base are in another castle, take this.

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
29th November, 2010 at 14:00:19 -

MMF's color replacer changes any instance of any color in the whole active object with one line. Every animation in that active in one fell swoop. The only thing I've noticed is a SLIGHT half second lag when it first changes the color, and then you're all set for the rest of the time your guy (or whatever) is on that frame.

What you could do is make a group of events at the start of each frame / game level / what have you and tie it to a global like this:

Start of Frame
+If (global value BLOCKCOLOR) = 1 then Replace color (whichever of active object "block") to (red)

Start of Frame
+If (global value BLOCKCOLOR) = 2 then Replace color (whichever of active object "block") to (blue)

Start of Frame
+If (global value BLOCKCOLOR) = 3 then Replace color (whichever of active object "block") to (green)


This way whenever the frame loaded it'd change your block to whichever current color it's supposed to be. Just remember that if you pick up the color changer during the level you'd need to do a ONE TIME ONLY color change or else it'll keep replacing the color and it'll be as slow as shit. I usually use a flag in that case and set it to ON once the color is change mid-frame.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!
   

Post Reply



 



Advertisement

Worth A Click