Page 1 of 1

CE Bug with multiple change delays

Posted: Wed Feb 13, 2008 7:46 pm
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)

Posted: Wed Feb 13, 2008 10:36 pm
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)... :-/

Posted: Thu Feb 14, 2008 5:28 pm
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.

Posted: Thu Feb 14, 2008 10:35 pm
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.

Posted: Fri Feb 15, 2008 3:42 pm
by Vagelis13
Well, I've now set the CE to change to an exit when showing the envelope so no problem ;)