Overlapping objects that 'infect' one another
Okay, so I have a lot of DIFFERENT active objects, all of which have the same qualifier. They're placed so that they slightly overlap each other in a big long line. Each object (other than those on the ends) is overlapped by the two adjacent to it.
I want to make it so that when a certain bullet-esque object collides with any of the objects on the line, ALL the objects on that line change colour. But I can't work out how to do it... :(
(Before you ask, no, I can't just make the whole line a single object. It's going to be used in something quite complex that necessitates having many small objects instead of one big one.)
The events I'm using so far look like this:
* [bullet] is overlapping [line qualifier]
|__* Destroy [bullet]
|__* Change animation sequence of [line qualifier] to Jumping
(This is becuase each of the objects holding the line qualifier have a 'colour changed' animation stored in Jumping.
This part works just fine. If I make a negated event that changes the animation sequence back to Stopped, I end up with a line that selectively highlights in one spot when hit by a bullet. This isn't what I want, though.)
* [line qualifier] is overlapping [line qualifier]
* Animation sequence of [line qualifier] is Jumping
|__* Change animation sequence of [line qualifier] to Jumping
(This DOESN'T work. It appears to do nothing.)
I've tried implementing fastloops into this, by spreading an alterable value through the line qualifier at start of frame, then always checking each of the objects individually with the second event above. This didn't work either.
I'm totally at a loss here... any ideas?
Re: Overlapping objects that 'infect' one another
For the problem with using a lot of different active objects, I would use the spread value function if you can. If you use the spread value function, you don't need the qualifiers and you can use many instances of one active object.
Re: Overlapping objects that 'infect' one another
My best bet is to create a new (invisible) object at your jumping line thing. When that new object touches a line, the line will also be turned to jumping and the invisible object is destroyed.
Re: Overlapping objects that 'infect' one another
Thanks everyone!
Two problems though:
Brandon: I'm afraid I can't do that, because the line is actually made up of 10 unique active objects that share a qualifier. I tried spreading a value through the qualifier before executing the fastloop I mentioned in the original post, and it didn't work.
Random: The thought had occured to me... I'll experiment with it, but I'm wary of pushing my active object count too high. (The play area is currently 2x2 sceens as a test, and the active object count is at around 150. I'm planning on having play areas in the game that are more in the region of 15x15. Time to experiment with 'load on call' I guess...)
However, as you probably guessed from that remark, yes, there are multiple lines like this one. And the worst part is, I need this event to be repeatable - when the bullet is touching one part of the line, it all changes colour. When it's touching no parts of the line, it all changes back. Over and over again. This means, I'm guessing, no setting objects to destroy. :(
Re: Overlapping objects that 'infect' one another
Quote:
Originally Posted by CASEY
Brandon: I'm afraid I can't do that, because the line is actually made up of 10 unique active objects that share a qualifier. I tried spreading a value through the qualifier before executing the fastloop I mentioned in the original post, and it didn't work.
Make sure you spread the value in a different event than the one that starts the fastloop!
Re: Overlapping objects that 'infect' one another
I don't like using qualifiers because they usually end up creating some "undesired" effect for me. Spreading the value correctly of one active object should work.