Is there a way to implement RNG for dialogue text?

Joined
Jul 12, 2020
Messages
95
Reaction score
18
First Language
English
Primarily Uses
RMMV
Just a smaaall question:

So the player can find a food item, and choose to go to their inventory and use it. An option will pop up asking if the player wants to eat it.

When the player does choose to eat it, I want the character to say something witty before consuming it...but I'd like for the witty comment to change based on randomness so that it doesn't get stale eating the item.

Is there a way to implement that?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,284
Reaction score
7,636
First Language
German
Primarily Uses
RMMV
control variable for getting a random number
conditional branch for checking the result
show text for giving different text in different branches

tedious if you want more than two or three different answers, but easy to do in a common event
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
741
Reaction score
470
First Language
Polish
Primarily Uses
RMMV
I think you should more depend on variables, I'm pretty sure you've asked almost the same question with "How to do different deaths", and the solution is the same. Variables and common events are your friends!!
 
Joined
Jul 12, 2020
Messages
95
Reaction score
18
First Language
English
Primarily Uses
RMMV
Ahh, yeah haha.

I love using common events a lot which is a good thing! I admittedly do not use variables as much as I should though. Once I begin making more dungeons, I'll prolly have more questions for variable usage as well huehue
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
533
First Language
English
Primarily Uses
N/A
I think you should more depend on variables, I'm pretty sure you've asked almost the same question with "How to do different deaths", and the solution is the same. Variables and common events are your friends!!
Variables are SO powerful and can do SO many different things. I second this comment
 

zzmmorgan

I've used punchcards
Veteran
Joined
Jul 10, 2020
Messages
113
Reaction score
179
First Language
English
Primarily Uses
RMMV
Variables, common events, and, if you feel really frisky, inline javascript.
That "script" button in events can give you a LOT of power to do interesting things.......
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,284
Reaction score
7,636
First Language
German
Primarily Uses
RMMV
ll prolly have more questions for variable usage as well
if you follow the link to the starting point tutorial in my signature, one of the other tutorials linked there is the Variables Guide - a game that teaches you how to use variables and you can check (with VXA or VXA Trial) what the event codes for that are.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Yet another gaming question, i'm currently playing Last of Us 2 and want to get another game to play next but can't decide between Ghost of Tsushima, Miles Morales & Jedi Fallen Order. After the latest mandalorian i AM on a star wars kick, but i also LOVED the last spiderman game that prequels Miles Morales. Ghost of Tsushima is the bottom of my list but i heard it was AWESOME. Just want a good story & fun gameplay.
I checked out Genshin Impact gameplay out of curiosity. I can't believe it's available as a mobile game too. Smooth animation, great music, and stellar sound effects (the ambient sounds are pretty detailed).

I'm flabbergasted to see games have becoming more and more advanced. Maybe also because I'm oblivious to current trend for a long time, it almost feel like I'm being sent into distant future. xD
xDRAGOONx wrote on WaywardMartian's profile.
Your artwork is amazing!!!
:ewat:
Stream will be live shortly with a session of the Interactive Text Adventure! Feel free to drop by!
I should finish the cat video I'm editing and finish the indesign stuff. So far only 1 is done and 4 to go

Forum statistics

Threads
105,663
Messages
1,015,362
Members
137,338
Latest member
greatgamegal
Top