The Daily Click ::. Forums ::. Klik Coding Help ::. Really super stupid n00b problem with fastloops I'm sure
 

Post Reply  Post Oekaki 
 

Posted By Message

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
26th May, 2009 at 04:03:34 -

Oh man and just when I thought I was figuring these things out..

Okay, here's exactly what I want to do, and how I'm doing it. And it doesn't work right. Anyhow there are 3 enemy active objects on the frame. When one of them hits my character I want it to change color and some variables and all that. The problem is when one hits the guy they ALL change color and their variables. So I thought my issue was that I wasn't using fastloops and tried this:


Always -> Start loop "BLAH" 3 times / Spread value 0 in alt Variable "SPREADER" for active "ENEMY"

On Loop "BLAH"
+Loop Index "BLAH" = ENEMY alt variable "SPREADER"
+ENEMY is overlapping CHARACTER
+other stuff -> Replace some colors of ENEMY and change the alt variables a bit



So when this didn't work I also tried to re-order some things like when spreading the value
before starting the fastloop but that was no good too. I mean with only 3 enemies this should be really easy, right?

Any idea what I'm doing wrong?

Thank you!

Edited by Del Duio

 
--

"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!

Ricky

loves Left For Dead 2

Registered
  28/12/2006
Points
  4075

Has Donated, Thank You!Game of the Week WinnerVIP MemberWii OwnerHero of TimeGOTM Winner! - November 2009I am an April Fool
26th May, 2009 at 04:13:04 -

I know you said you reordered. But did you put the spread value in a separate event? Spread value doesn't work while in the same event as starting a fastloop.

I learned that by reading this:
http://www.create-games.com/article.asp?id=1798

it says that towards the bottom.

Edited by Ricky

 
-

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
26th May, 2009 at 04:18:04 -


Originally Posted by Ricky
I know you said you reordered. But did you put the spread value in a separate event? Spread value doesn't work while in the same event as starting a fastloop.



Ah, I have them both in the same event. I wonder if that's what's causing the problem.

So aside from that does my condition list look ok? You'd need the "on loop" and a line to compare the loop index with whatever variable is getting a 0 spread in right?

 
--

"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!

Ricky

loves Left For Dead 2

Registered
  28/12/2006
Points
  4075

Has Donated, Thank You!Game of the Week WinnerVIP MemberWii OwnerHero of TimeGOTM Winner! - November 2009I am an April Fool
26th May, 2009 at 04:21:10 -

Yeah, i'm pretty sure it will work if you:

Always.
-Spread value 0 in alt Variable "SPREADER" for active "ENEMY"

Always
-Start loop "BLAH" (number of ENEMY) times





 
-

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
26th May, 2009 at 04:21:49 -

Damn Dines is a genius isn't he?

Thanks Ricky, I'll bet that's what the problem is.

P.S: I should've bought a Hero of Time tag when they were cheap!

 
--

"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!

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
28th May, 2009 at 14:49:05 -

Ah dammnit there's a problem again!

Okay so the variables only get passed to the single enemy (which is what I want) but the color replacer events recolor every instance of the same sprite on the level (weird!) When I just made it so that an ink effect was used it worked perfectly so it's just the color replacer events that are the problem.

Does anybody know if you CAN just use the color replacer event to recolor a specific sprite or will it always do every one on a frame? If it doesn't work with fastloops I doubt it can be done but who knows?

 
--

"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!

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
28th May, 2009 at 18:20:11 -

The color replacer event will affect all of the instances of an object regardless of the object scope. This is due to the fact that mmf replaces the color of active in memory so that all the other objects that refrence this active will change as well. A way around this would be to make a separate animation for the color change. Not only would this fix the problem but the game would run faster too because replacing a color takes more CPU than loading a premade color change.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click