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,351
Reaction score
7,984
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 Profile Posts

I found an absolutely brilliant lifehack on the internet today.

Screenshot_760.jpg
It does sometimes get a little embarrassing that I often come here to ask for help with something and seldom have anything to actually show for it. If there is one thing though I can commend myself for, it's for sticking with an idea I've been tinkering with for this long now and gradually making headways. Even though I've been reserved about my progress, I can say I'm farther now than where I initially started.
I'm gonna put my project on pause for a tiny bit so I can explore the engine outside of it... Winging it can only get you so far LMFAO
Have seen some of my favorite people here posting and helping others with questions today -- love to see it!

Forum statistics

Threads
116,136
Messages
1,096,072
Members
151,555
Latest member
Fotdur
Top