Runako

Miracle/Magic
Veteran
Joined
May 22, 2012
Messages
128
Reaction score
26
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,325
Reaction score
7,902
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
128
Reaction score
26
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

new mechanic in battle where you can mentally erase enemies when you deplete all their MP instead HP. this gives you a special item of their "memory". it's pretty to do in battle so far.
Apparently MZ lets you preview move routes in the move route editor without having to start up test game. That could save a lot of time during development compared to MV, especially for a long game that uses a lot of event movement for cutscenes.
A repost of an old meme I had made, now with music

I have a really hard time keeping all these goodies secret til December... but I swear, it is worth the wait!

Forum statistics

Threads
115,859
Messages
1,093,531
Members
151,081
Latest member
MOLLARTA
Top