Change if touching two elements at the same time...

Got a cool idea that should be in R'n'D? Let's hear it!

Moderators: Flumminator, Zomis

Post Reply
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Change if touching two elements at the same time...

Post by Zomis »

I can guess that this one has already been mentioned before, but it would make Mathematics in RND much more handy.

Simply what I'm asking for is a change condition for two elements at the same time, like "CE 1 changes when touching CE 2 on top and CE 3 on bottom".
I also guess this isn't the easiest one to implement, but well...I hope it's worth to put on the todo list.
I think it could make a fully working decimal multiplicator with about 6-8 CEs...
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

This is practically a logical "AND" (where all change conditions are currently combined by a logical "OR"), which is indeed a lot more complicated. For the "OR" case, it's sufficient to simply trigger the change when any of the change events happens. For the "AND" case, it would be needed to store the different conditions and check if all occur at one time.

For the case you mentioned here, this is probably not needed, because it can also be checked at one time. So maybe this is something which could be made possible in a future version. :)
someguyfrompoland

This

Post by someguyfrompoland »

It is possible using 4 CEs.

CE 1 will be changed to CE 4 when touching CE 2 on top, and CE 4 will be changed when touching CE 3 on bottom

SOrry for my bad english, i'll be from poland.
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Re: This

Post by Zomis »

someguyfrompoland wrote:It is possible using 4 CEs.

CE 1 will be changed to CE 4 when touching CE 2 on top, and CE 4 will be changed when touching CE 3 on bottom

SOrry for my bad english, i'll be from poland.
That does not work, since only 1 change can be triggered for each position each frame. Trust me, I've also tried that.
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> That does not work, since only 1 change can be triggered for each
> position each frame. Trust me, I've also tried that.

Yes, but what if you let the "test CE" change again after one more frame? I could imagine that you could workaround the "only one change per frame" problem that way... Haven't checked this, though.
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Holger wrote:> That does not work, since only 1 change can be triggered for each
> position each frame. Trust me, I've also tried that.

Yes, but what if you let the "test CE" change again after one more frame? I could imagine that you could workaround the "only one change per frame" problem that way... Haven't checked this, though.
I believe that's impossible. Since even if the CE waits for one frame, then the next CE needs to change directly the next frame because it's already touching an element. And when a new CE is created, it doesn't checks if it's actually touching elements for the change pages...I think.
User avatar
Alan
Posts: 661
Joined: Fri Jun 18, 2004 7:48 pm

Post by Alan »

Simply what I'm asking for is a change condition for two elements at the same time, like "CE 1 changes when touching CE 2 on top and CE 3 on bottom".
I'm not 100% sure what you mean here... It all depends on how your level works, and what you want. Are these CE's in motion? And how is it first triggered?

http://www.ambience.2restinpeace.com/002.level

In this little example, CE1 only changes into the normal "number 2" element if CE2 AND CE3 is above and below it respectfully, and it does it in one cycle.

To start the test I've made CE1 change into itself after 1 second.

If CE2 touches CE1, it changes into itself, but with the "number 1" below it (overwriting CE1)
If CE3 touches the "number 1" which is aboue it, it also changes to itself but with a "number 2" above it (overwriting "number 1")

This also works if CE1 if moving inbetween CE2 & CE3

Maybe I've missed the point here?
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Alan wrote:I'm not 100% sure what you mean here... It all depends on how your level works, and what you want. Are these CE's in motion? And how is it first triggered?
After watching your example level, I also wonder the same thing (how my level works). Your solution seems to work great, now I just have to see where I was going to use it...
I think it was in Mathematics, Solomon's Key 2, or Chip's Challenge.
Post Reply