gigoe

Warper
Member
Joined
May 8, 2017
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMVXA
I want to make it so when you're in a room for a specific amount of time doing nothing, a dialogue box shows up with the character asking if you're there.

Moving during the timer wont reset it.
The only thing that will do that is leaving the room and coming back in

I want to know how to achieve this for my game, because i want it as an easter egg.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,358
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
can you show us a screenshot of the event you have so far?

there are three different ways to achive this (the timer is only one of them and the one that is usually the less optimal), but we need to see what you have planned to decide if a wait sequence or a gametime check with variables might be better.
 

gigoe

Warper
Member
Joined
May 8, 2017
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMVXA
can you show us a screenshot of the event you have so far?

there are three different ways to achive this (the timer is only one of them and the one that is usually the less optimal), but we need to see what you have planned to decide if a wait sequence or a gametime check with variables might be better.
I'm pretty new to this software, so excuse me, but i haven't really planed much right now. i just have the dialogue in an event, not any variables.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,358
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
Then I suggest you follow the link in my signature to the starting point and work through the eventing tutorials listed there as you'll need a good knowledge of basic eventing to pull this off.

Basically you'll need a parallel process to count time manually in a time variable and show text if time is up, and have a second (different) parallel process event that sets the time to zero and then erases itself (erase events means that it will only work once on entering the map)
 

KittyKatBlack

Villager
Member
Joined
May 17, 2017
Messages
6
Reaction score
2
First Language
English
Primarily Uses
RMVXA
So basically you want to make it so if the player hasn't moved for a specific amount of time it plays a dialog?

Make two variables:
PlayerLastX
PlayerLastY
Make a common event that runs a parallel process that records the player X and Y location to PlayerLastX and PlayerLastY respectively.

Then wait one frame and then check the current X and Y of the player against what PlayerLastX and PlayerLastY says. If this is true, make a third Variable called Timer and have it add 1 to this variable every time this situation is true. (Basically it counts how many seconds the player has not moved.) When it is not true, set the variable to 0. (AKA reset the timer).

Then just make an event either in map (If you only want it to register in this specific location) or another common event running in a parallel process (If you want it to happen anywhere in the game) that checks the Timer and once it reaches a certain number, it plays the dialog you want. So it would be something like "If: [Timer]>= 6000" (this will be frames since the timer updates every frame) "Then: Play Dialog" then reset the timer to 0.

I haven't actually tested this, but I believe in theory it should work out just fine.

You could probably do it cleaner in scripting, but if you just want to do it through events I BELIEVE this should work.

If it doesn't update the timer properly, try setting the wait time between update checking to something like 10 frames to give the player time to actually move to a new position before resetting for another check.
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top