2k3 - Help with a time event

I'm new using RPG Maker (started with 2k3), and I'm trying to make an event that all you have to do is wait to be transferred to somewhere, or press a key to get back to the last event page

What I did:

I created an event with choices, "yes" and "no", when you choose "yes" everything normal happens, but when you choose "no" you activate a switch called "keep sleeping", which I tried to create a time counter that when it reaches "0" the player is transferred, or if you push the action button before the time reaches 0 you go back to the choices and don't gets transferred

(I tried to make as a common event, and another page event, but neither of them worked...)

what I did:


idk1.png


idk.png
You set it to 15 seconds immediately before you check whether it's 0, so it will never be 0 at that point.
Very untypical to use the timer-feature for such situation, but it's okay, especially when the player should see how much time is left (and I don't know if you have set it to be visible).

The CE you have set up will stuck the moment it enters the ELSE-area, because it's built to wait in this position until the key is pressed.

~炬燵あ
Very untypical to use the timer-feature for such situation, but it's okay, especially when the player should see how much time is left (and I don't know if you have set it to be visible).

The CE you have set up will stuck the moment it enters the ELSE-area, because it's built to wait in this position until the key is pressed.

~炬燵あ

So thanks for helping, but do you have a better way to do this?

Because I'm trying other ways to get the same effect but it's not beeing succesfull, I just want to make an event that when the player chooses "no" it will count a certain amount of time and he will be teleported to another area, or if he presses any key before being teleported it will cancel the timer (and the teleport) and go back to the choices...

I tried with "wait", time counter, etc...
You set it to 15 seconds immediately before you check whether it's 0, so it will never be 0 at that point.
I don't got it, how I'm supposed to do it? I tried with "wait", but didn't work... And thanks for helping! I tried to explain what I'm "doing" above...
The method below is running inside the same event. To use this process in multiple events, put the loop-part into a CE (without condition-switch) that can be called directly (there is a call-event-command on page 3).

Variable #1234 (replace with the one you want to use) is set to 15 seconds multiplied with 60 frames before the loop is starting. This is the maximum of time it will be waiting, every frame it will drop by 1. The loop will cancel itself when it reaches 0.

Variable #1337 (again, replace this number with whatever fits) is used for catching the state of game-buttons every frame (it's important to uncheck the wait-option). My example catches the buttons for confirm and cancel, but you may want to configure it different. The loop will cancel when the catching-variable has detected something.

The wait-command with 0.0 seconds at the end is telling the event to wait until the next frame before restarting the loop-area. In case you'd forget to put it there, the event would immediately execute up to 10000 commands inside the loop, leading the time-variable to drop from 900 all the way down to 0 in just a wink instead of 15 seconds.

Code:
<>Choice: [Yes] [No]
: When [Yes]
 <>(...)
 <>
: When [No]
 <>Set Variable [1234] = 900
 <>Loop
  <>Set Variable [1234] -= 1
  <>Key Input [1337], Don't wait, {Confirm, Cancel}
  <>If Variable [1234] <= 0
   <>Break Loop
   <>
  : END If
  <>If Variable [1337] > 0
   <>Break Loop
   <>
  : END If
  <>Wait: 0.0s
  <>
 : END Loop
 <>
: END Choice
<>

A short variant that calls the loop as CE would look like this:

Code:
<>Choice: [Yes] [No]
: When [Yes]
 <>(...)
 <>
: When [No]
 <>Set Variable [1234] = 900
 <>Call Event: CE [Continue Sleeping]
 <>
: END Choice
<>

~炬燵あ
The method below is running inside the same event. To use this process in multiple events, put the loop-part into a CE (without condition-switch) that can be called directly (there is a call-event-command on page 3).

Variable #1234 (replace with the one you want to use) is set to 15 seconds multiplied with 60 frames before the loop is starting. This is the maximum of time it will be waiting, every frame it will drop by 1. The loop will cancel itself when it reaches 0.

Variable #1337 (again, replace this number with whatever fits) is used for catching the state of game-buttons every frame (it's important to uncheck the wait-option). My example catches the buttons for confirm and cancel, but you may want to configure it different. The loop will cancel when the catching-variable has detected something.

The wait-command with 0.0 seconds at the end is telling the event to wait until the next frame before restarting the loop-area. In case you'd forget to put it there, the event would immediately execute up to 10000 commands inside the loop, leading the time-variable to drop from 900 all the way down to 0 in just a wink instead of 15 seconds.

Code:
<>Choice: [Yes] [No]
: When [Yes]
 <>(...)
 <>
: When [No]
 <>Set Variable [1234] = 900
 <>Loop
  <>Set Variable [1234] -= 1
  <>Key Input [1337], Don't wait, {Confirm, Cancel}
  <>If Variable [1234] <= 0
   <>Break Loop
   <>
  : END If
  <>If Variable [1337] > 0
   <>Break Loop
   <>
  : END If
  <>Wait: 0.0s
  <>
 : END Loop
 <>
: END Choice
<>

A short variant that calls the loop as CE would look like this:

Code:
<>Choice: [Yes] [No]
: When [Yes]
 <>(...)
 <>
: When [No]
 <>Set Variable [1234] = 900
 <>Call Event: CE [Continue Sleeping]
 <>
: END Choice
<>

~炬燵あ

I tried what you said here, but for some reason it didn't work, but I did it in other ways that got "right", but with another problem, when the player is teleported he becomes invisible and can't walk....

even when i change the actor or just his appearance nothing happens

Original thread: https://forums.rpgmakerweb.com/threads/2k3-help-with-a-time-event.149464/