Runako

Miracle/Magic
Veteran
Joined
May 22, 2012
Messages
126
Reaction score
25
First Language
English
Primarily Uses
RMMV
Hey, good morning everyone!

In my game I run a tight conversation system where players interact with NPCs and they are given multiple conversation options: they can listen, respond, or initiate conversation. As they communicate with NPCS, they lose or gain points.

With that said, How do I create a cooldown system. So after each specific interaction, the player must wait 5 minutes to do that interaction again (so players don't spam specific interactions)

For example.

Npc: "Nice weather we're having aye?"
Player:
Option 1: No it's terrible
Option 2: It's great

Player chooses option 2 "it's great".
5 minute cooldown on option is acitivated
Now option 2 is either grayed out or gives the player a message to wait.

Thank you anyone and everyone for your assistance. Much love!
 

OmnislashXX

Veteran
Veteran
Joined
Mar 30, 2012
Messages
617
Reaction score
3,703
First Language
English
Primarily Uses
RMMV
You could use a Self-switch that Turns on, and then use a Second Event page with the Switch on.

Then you create a Variable that changes in value after some time. When the variable equals a certain value, it can turn the Self Switch back off.

You might have to tweak things a bit, but your answer lies in Switches and Variables.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,318
Reaction score
7,857
First Language
Indonesian
Primarily Uses
RMVXA
Problem with that, if you transfer map, and back to the map where the conversation is on cooldown, the timer may reset. So you need 5 minutes waiting on that map before it wears off
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
412
First Language
German
Primarily Uses
RMMV
You could use a Timestep within a Conditional Branching Branch.
NPC Eventpage.

Control Variable1 = Others -- GameTime
-Conditional Branch Variable1 is equal or more than Variable2
If Yes
-Control Variable2 = Others Game -- Time
-Control Variable2 += 3600
Game Time is in Frames, 60 Frames one seccond(3600 = 1Minute)but lets continue making a kind of timestamp now.
-Show Textbox: I will not speak to you for 1 Minute.
else:
For Example show Show Baloon Icon: That indicates, not now...


So everytime you click the NPC it will check if the current time variable1 is the same or above the time value which is in variable2.
Thatway the code only runs when needed.
If you include a Event Self Variables Script, than you could give your NPC dozens of Time Stamps, Relationship Values, and much more.
This is only simple pseudo code you would need to make it fit to your needs.

Edit: I cant remember if the ingame Timecount stoped while Menu is Open? An parallel Event Timer would stop.
I read about Time Stamps some Time ago in an Article.
 
Last edited:

Runako

Miracle/Magic
Veteran
Joined
May 22, 2012
Messages
126
Reaction score
25
First Language
English
Primarily Uses
RMMV
Im going to give this method a try this weekend. Much love guys because every word of advice helps to move the progress. I promise game design is like a series of puzzles lol.

I was thinking of using common events to set a timer. But i havent had a chance to try it yet.
 

Latest Threads

Latest Posts

Latest Profile Posts

Doing RPG Maker News for 28th September 2021

RMMV - Skip script errors:

For game developer testing purposes.
You know, I really get to farm likes since I post all of @Avery and @hiddenone 's blog tutorials on the forums...
Back from a very long hiatus with a new project woo
This is my battler placeholder image trying out art styles too I want to fake a backview battle system
I think I will want portraits and battle sprites to be 2D and stick to pixel art for overworld not 100%sure but pretty sure its easier to make pixel art for overworld sprites, events and maps and stuff.
Placeholder.png
$Syringer.png
toying with a brand new monster design

Forum statistics

Threads
115,440
Messages
1,089,933
Members
150,215
Latest member
Cam2244
Top