CardeMaker

Just a creative guy
Veteran
Joined
Aug 13, 2019
Messages
98
Reaction score
22
First Language
Portuguese
Primarily Uses
RMMV
Hello, it's me again, well, the title says almost everything, i want to play an event that happens when the player gets inactive for an certain amount of time, but the way i know of doing it is manually checking each usable key if they are pressed or not (and there's the mouse too that i was forgetting), i know there is probably an easier way to make it, like maybe an script line or something, if anyone knows something like this, please tell me, thanks for helping!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,024
Reaction score
10,022
First Language
German
Primarily Uses
RMMV
it depends on how you define "inactivity".
control variable game data other contains quite a number of counters, and you can compare how many play time has passed with how many steps were taken in the same time.

but that does not cover menu openings or so.
 
  • Like
Reactions: Bex

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,762
Reaction score
609
First Language
German
Primarily Uses
RMMV
Is this for a Offline RPG Maker Game or is this for some kind of Online Multiplayer?
 

CardeMaker

Just a creative guy
Veteran
Joined
Aug 13, 2019
Messages
98
Reaction score
22
First Language
Portuguese
Primarily Uses
RMMV
Is this for a Offline RPG Maker Game or is this for some kind of Online Multiplayer?
Offline
it depends on how you define "inactivity".
control variable game data other contains quite a number of counters, and you can compare how many play time has passed with how many steps were taken in the same time.
This kind of system seems useful to make an idle event, or something that you need to wait stopped to unlock
but that does not cover menu openings or so.
in menu it would be useful to show an video demonstration of the game like arcades or some old console games.

anyway, how can i use it?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,024
Reaction score
10,022
First Language
German
Primarily Uses
RMMV
you'll need a parallel process constantly updating values of "current" variables, then comparing them to different variables for the old values.
and depending on what is different either update the old variables with the current ones (if the player moved, every count has to start again from current) or trigger the idle whatever.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,303
Reaction score
2,462
First Language
Dutch
Primarily Uses
RMMV
you can try to use a conditional branch:

if: script: !$gamePlayer.isMoving();
variable x += 1
else
variable x = 0
end

you need a common event probably in parallel set by switch.
so the variable counts UP when the player isn't moving,
if it does move, variable reset to 0.

but that depends on the mechanc you want to build.
you probably also want to check if it doesn't dash as well, or it counts
also UP when dashing.
 

Latest Threads

Latest Posts

Latest Profile Posts

I've never felt prouder of my little game!! *o*
DamageEvil_2.png added!
index.php

Forum statistics

Threads
125,672
Messages
1,172,710
Members
164,799
Latest member
PurpleClouds
Top