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,913
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
413
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

While was working on one of the monsters that will appear in my horor game I may have made harold a Lovecraftian monster. (I used his head to keep things aligned.)
Finally got my website fixed and the security sorted so it's been a productive day. Can I go to sleep now? I mean... I don't need to work right?
It's always a good idea to refresh yourself on what your plugins do. I'm working on a map with opening walls, and I was about to tear my hair out over how much image editing and hand-constructing of autotiles I'd have to do, when I looked again and saw @Shaz 's Tile Changer could copy areas from another map.
"sorry it took me so long to respond" - can we please agree not to say that anymore unless it actually took a long time?! (Like 36hrs at least) I mean, I'm running out of funny responses here xD
Ugh... 4:53AM over here and I can't sleep so why not just game make.

Forum statistics

Threads
115,922
Messages
1,094,028
Members
151,175
Latest member
phobium
Top