Second time variable, is it possible?

Hey rpgm community, I've been trying for over an hour to find a solution to what should be a very simple problem, I'm hoping someone here can help because I'm at a loss...

So, in my little horror game, there's a time system, and it's working perfectly, all events tied to it are working perfectly.

However, there's one event I NEED to work in order to prevent the player from winning by sitting completely still in a hiding place. This event can't use the time variable, otherwise it would simply kill the player at the same time. But, I need to use a variable to keep track of this event based on how long the player is hiding. So my two variables are "Time" and "Hiding Time". The problem is this-

"Time" is always active, it always works, no issues.

"Hiding Time" activates when a player is hiding, via parallel event, just like "Time", but with the condition that the hiding switch is on. The switch is working, it effects other events normally. But no matter what I do, the other event pages that are triggered when "Hidden Time" reaches points such as 10 seconds, or 10 minutes, NEVER activate, no matter what.

I've tried including them in the same event as the hidden time counter, in other parallel/autorun events, as a common event, I've added loops, used conditional branches, scanned every forum I could find, and... Nothing. Is it possible to have two parallel events active at the same time to count separate variables? Even if I have on the same page, Time and Hidden Time's counters, hidden time triggered events just will not work. I don't have any plugins that need variables, and because I've just started putting the game together, these are literally the only two variables at the moment. I promise I've checked 10 times, and even narrowed the events process to something as simple as this-

Page1

Parallel, wait 60 frames, Hidden Time+1

Page 2

Autorun CONDITION- Hidden Time is 10 or greater, Game Over

Even that won't work, but there's nothing else adding or subtracting from hidden time. Please, if anyone has a solution, I really need this to work
On the surface that should work. Please show screenshots of your event - both pages, and include the entire event window.

Also use the debug console to confirm that your Hidden Time variable IS over 10.

I imagine there must be something there that causes Hidden Time to go back to 0 when the player is not hiding, otherwise every time they hid for less than 10 seconds, it would accumulate. Can you show a screenshot of that event as well?

To answer your question, yes, you can have multiple parallel process events active at the same time.
But no matter what I do, the other event pages that are triggered when "Hidden Time" reaches points such as 10 seconds, or 10 minutes, NEVER activate, no matter what.
this sounds like u try to use, different event pages of the same Event at the same time..
..if thats the case u have to use self-switches or enable/disable event-page conditions, in order to make sure that only the event-page which is suppossed to be active ,can work..
-> u cant use 2 or more event-pages of the same Event at the same time.. if one eventpage is active, it wont let another eventpage(of the same Event) work..
=> if that is the problem ,try to use several common events instead of 1 event with several event-pages..
---------------------------------------------
Perhaps i understood your problem totaly wrong ,, so this is just a theorie .. and i agree that more information with screenshots of the event and the event-pages could help..
---
- and yes u can use as much "parralel" working events or common events as u want
- but if u use "autorun" ,notihing else will work till the autorun-event is finished
Moderator note: @Dopan I have removed the Blue text from your post.Please avoid using blue or red text in posts, as blue is reserved for Moderator Actions/Requests (like I did here) and red is reserved for Verbal Warnings.

Any other color is OK to use. You can edit your post and add a different color back for emphasis, if you want.

Sorry for the confusion; I wish we could remove the colors from members' control panels but there's no easy way to do that.
I would use a conditional brach

if: script: !$gamePlayer.isMoving()
wait 60 frames
variable X += 1
else
Variable = 0 (when the player is moving)
end
if: variable X > = 10
game over
end

this reset it variable x to 0 if the player is moving, when he is hiding,
and walk, i resets to 0 again, if he waits to long, it will be game over.

I might have a mistake or might not work in te way you want, but you can
alter where needed though 🙂

you can also do $gamePlayer.isMoving()
variable X = 0
else
variable x += 1
end

it depends whats works better for you, there can be easier methodes as well though.
On the surface that should work. Please show screenshots of your event - both pages, and include the entire event window.

Also use the debug console to confirm that your Hidden Time variable IS over 10.

I imagine there must be something there that causes Hidden Time to go back to 0 when the player is not hiding, otherwise every time they hid for less than 10 seconds, it would accumulate. Can you show a screenshot of that event as well?

To answer your question, yes, you can have multiple parallel process events active at the same time.

Okay, so for some reason it's telling me the server can't process the screenshots to upload them >-<

Well, you're right. I have the event to parallel an else conditional branch. If the player is hiding, it adds 1 to the variable every second. If not, it removes 1 every 2 seconds, but I can wait a full minute hiding with nothing happening.


I've even made the event literally this simple-

Page1.
Parallel. NO CONDITIONS. Add 1 to hiding time every second.

Page2.
Parallel. Hiding Time=15. Flash Screen.

The screen will never flash, indicating that the variable isn't going up. Meanwhile, regular time, and alllll of its 8 dependent events run perfectly. Regular time is set up the exact same way, just with no subtract mechanic.

Even if there's no conditions, the hiding time variable will not ever work >-< and I promise it's a separate event, I have 25 events, 12 of which are parallel and 7 action button, 2 event touch, and 4 static lights.

ONLY the one parallel event that counts hiding time is using the hiding time variable
I would use a conditional brach

if: script: !$gamePlayer.isMoving()
wait 60 frames
variable X += 1
else
Variable = 0 (when the player is moving)
end
if: variable X > = 10
game over
end

this reset it variable x to 0 if the player is moving, when he is hiding,
and walk, i resets to 0 again, if he waits to long, it will be game over.

I might have a mistake or might not work in te way you want, but you can
alter where needed though 🙂

you can also do $gamePlayer.isMoving()
variable X = 0
else
variable x += 1
end

it depends whats works better for you, there can be easier methodes as well though.

Okay... So I fixed my problem. Copying and pasting the time event, then changing the variable it effects, suddenly makes this work. Yet if I create another parallel variable myself, it won't work??

Either way, that is a very useful script, I tested it out with an event and some modifications and it works perfectly! Thank you
You're not using a variable that's also being used by a plugin, are you?

Original thread: https://forums.rpgmakerweb.com/threads/second-time-variable-is-it-possible.125316/