CE Bug with multiple change delays

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
User avatar
Vagelis13
Posts: 9
Joined: Wed Oct 31, 2007 6:27 pm
Location: Greece
Contact:

CE Bug with multiple change delays

Post by Vagelis13 »

OK, we've got a CE's change page which has delay of change 120 secs, and then it exits the player.Now, there is a second page which has 80 seconds delay and then it shows envelope 1.Well, the problem is, that the change page 2 (show envelope) doesn't happen.I tried again with un-ticking the first page's delay and it worked!

Why does that happen?

(Note: the change pages are on the same CE)
I love RnD and I'd prefer it from much "nice" games.

Level Currently Contributing: The City

@Holger: I will tell friends to play RnD ;)
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

This is not really a bug, but a known (well, OK, it's not documented anywhere) limitation of CE change pages: There can be only one active change page with a delay condition, because there's only one delay counter implemented per tile that counts down from the first delay value to zero, so subsequent delay conditions are ignored for now.

Any yes, this should probably be fixed/corrected/extended (by a counter solution that behaves a bit more clever)... :-/
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Holger wrote:This is not really a bug, but a known (well, OK, it's not documented anywhere) limitation of CE change pages: There can be only one active change page with a delay condition, because there's only one delay counter implemented per tile that counts down from the first delay value to zero, so subsequent delay conditions are ignored for now.

Any yes, this should probably be fixed/corrected/extended (by a counter solution that behaves a bit more clever)... :-/
How about this:
Only one counter per CE, but it counts UP from 0 instead of DOWN
And then every frame, it checks
if (counter % changedelay[changepage] == 0)
to check whether the change page should be triggered.
It could also be possible to use:

Code: Select all

function delaysmulted() {
  j = 1;
  for (var i=0; i<=changepages; i++)
    j *= changepage[i].delay;
  return j;
}
if (counter == delaysmulted) counter = 0;
To reset the counter when all delays happen at once, which means that it's "safe" to reset the counter to zero to prevent overflows.

Well, just my two cents.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

Yes, I think this is more or less exactly how it could be done!

But there's no hurry, as I think that everything regarding change delays can already be accomplished with the current solution, despite the limitations, using a few more CEs.
User avatar
Vagelis13
Posts: 9
Joined: Wed Oct 31, 2007 6:27 pm
Location: Greece
Contact:

Post by Vagelis13 »

Well, I've now set the CE to change to an exit when showing the envelope so no problem ;)
I love RnD and I'd prefer it from much "nice" games.

Level Currently Contributing: The City

@Holger: I will tell friends to play RnD ;)
Post Reply