Random message when talking to an NPC.

NeoShima

Veteran
Veteran
Joined
Apr 19, 2020
Messages
36
Reaction score
2
First Language
Russian
Primarily Uses
RMMV
Hello everyone! Sorry for my English, tryin' my best. I have an idea. After quest complete, I want my NPC to answer with a 2-3 different replics by clicking on him. If NPC will answer with only 1 message, its gonna be too boring. Is it real to make?
 
Joined
Mar 25, 2017
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMVXA
You could probably make the event set a variable you're not using to a random number between 1 and 3, then display a reply for each result? Something like this would work.
 

NeoShima

Veteran
Veteran
Joined
Apr 19, 2020
Messages
36
Reaction score
2
First Language
Russian
Primarily Uses
RMMV
You could probably make the event set a variable you're not using to a random number between 1 and 3, then display a reply for each result? Something like this would work.
It works, but only one time. After the second click on NPC, the event doesn't work. What do you think?
 

NeoShima

Veteran
Veteran
Joined
Apr 19, 2020
Messages
36
Reaction score
2
First Language
Russian
Primarily Uses
RMMV
You could probably make the event set a variable you're not using to a random number between 1 and 3, then display a reply for each result? Something like this would work.
Well, the solution is easy. I just added "control variables: random = 0" after every message.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,693
Reaction score
554
First Language
Dutch
Primarily Uses
RMMV
the above solution basicly loops as long you dont use a selfswitch on it.
 

Riazey

Master of None
Veteran
Joined
Feb 27, 2014
Messages
69
Reaction score
52
First Language
English
Primarily Uses
RMMV
Using control variables like stated above is great if you just want to use eventing~ If you want to go a bit more intermediate you can make if statements too, so that if something happens or hasn't happened in your story npcs will comment on it. This is slightly more advanced, but it adds a ton of character to your npcs!



Below you can see when 1 is randomly rolled, if the "battle" switch is on (turned on when they slayed a specific monster) they will comment on you killing it. But if the switch is off when 1 is rolled, they will comment on the beast still being alive.

1590256692310.png

I also put Exit event processing after every dialog, as this will immediately end the event rather than it also checking "if this is 2, if this is 3, if this is 4, if this is 5, if this is 6". You won't really see a performance dip not using Exit Event Processing unless it's a huuuuuuge event with a ton going on, but when you get into more advanced eventing it's a lifesaver! I just have OCD about it hahaha.
 

NeoShima

Veteran
Veteran
Joined
Apr 19, 2020
Messages
36
Reaction score
2
First Language
Russian
Primarily Uses
RMMV
Using control variables like stated above is great if you just want to use eventing~ If you want to go a bit more intermediate you can make if statements too, so that if something happens or hasn't happened in your story npcs will comment on it. This is slightly more advanced, but it adds a ton of character to your npcs!



Below you can see when 1 is randomly rolled, if the "battle" switch is on (turned on when they slayed a specific monster) they will comment on you killing it. But if the switch is off when 1 is rolled, they will comment on the beast still being alive.

View attachment 144916

I also put Exit event processing after every dialog, as this will immediately end the event rather than it also checking "if this is 2, if this is 3, if this is 4, if this is 5, if this is 6". You won't really see a performance dip not using Exit Event Processing unless it's a huuuuuuge event with a ton going on, but when you get into more advanced eventing it's a lifesaver! I just have OCD about it hahaha.
Sounds interesting! I will save that! Right now I don't have any ideas how I can use it in my game. Its only in alpha. Mb in future I'll try it. Thanks for your support!
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,693
Reaction score
554
First Language
Dutch
Primarily Uses
RMMV
I have multiple test project, each with its own mechanic. so you can make a project or tutorial
project and make an NPC using that (you can use YEP_MiniLabel so you can use 1 map for
for multiple test events, so you can test and recheck how it's made and impliment that into
the main project.

this keeps your project from corrupting, but also make backup's from time to time.
 

NeoShima

Veteran
Veteran
Joined
Apr 19, 2020
Messages
36
Reaction score
2
First Language
Russian
Primarily Uses
RMMV
I have multiple test project, each with its own mechanic. so you can make a project or tutorial
project and make an NPC using that (you can use YEP_MiniLabel so you can use 1 map for
for multiple test events, so you can test and recheck how it's made and impliment that into
the main project.

this keeps your project from corrupting, but also make backup's from time to time.
Good, thanks
 

Anthony Xue

Ancient Architect
Veteran
Joined
May 9, 2016
Messages
93
Reaction score
94
First Language
German
Primarily Uses
You might also want to have a look at this:
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,641
Reaction score
8,071
First Language
English
Primarily Uses
RMMV

@NeoShima , please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


You can quote more than one post in a reply by clicking quote for each, then clicking insert quotes. Also, instead of quoting to reply, you can tag a person using @ and their username as I've done above.
 

NeoShima

Veteran
Veteran
Joined
Apr 19, 2020
Messages
36
Reaction score
2
First Language
Russian
Primarily Uses
RMMV
[DPOST]@NeoShima [/DPOST]
You can quote more than one post in a reply by clicking quote for each, then clicking insert quotes. Also, instead of quoting to reply, you can tag a person using @ and their username as I've done above.
Got it, thanks!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Stream will be live shortly with some pixel art! Feel free to drop by!

Can't believe I forgot to put an image of my drawing pad! It looks kinda like this, maybe I'll get a better pic tomorrow...
Backup tip: If you don't want to back up your whole project every day, at least back up everything *except* your Image and Audio folders, which you can do weekly/as needed/etc.
The final version of our game is already available both in English and Spanish! ^___^
Can't believe this day has finally come... T_T
Im so happy that Dead By Daylight is getting a Silent Hill chapter! Cant wait to play as pyramid head

Forum statistics

Threads
97,815
Messages
947,152
Members
129,035
Latest member
Tauron7
Top