The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: Blue on January 20, 2010, 12:59:53 AM

Title: How to make an NPC talk somewhat randomly
Post by: Blue on January 20, 2010, 12:59:53 AM
Oh, here I'm going to show you how to make an NPC say different sentences nearly everytime you talk to him...

Step 1.  Make an event.

Step 2. Make a variable called talk randomizer.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1022.photobucket.com%2Falbums%2Faf348%2FAPGDMA%2Ftut1.png&hash=6c109b3261df60fd7d96884e714a4ce0d685f7a2)

Step 3. Set talk randomizer to random 1~4.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1022.photobucket.com%2Falbums%2Faf348%2FAPGDMA%2Ftut2.png&hash=e7813352c35a60e4a53748796adfc237c589aa82)

Step 4. Make a Conditional Branch. Make the condition "talk randomizer is equal to 1".

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1022.photobucket.com%2Falbums%2Faf348%2FAPGDMA%2Ftut3.png&hash=1487fedb36f0046a8180e58781f526cf6b34cbf9)

Step 5. Make a Conditional Branch. Make the condition "talk randomizer is equal to 2".

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1022.photobucket.com%2Falbums%2Faf348%2FAPGDMA%2Ftut5.png&hash=a5c3a46dae653fae2b7a50c4044557d1a04ea048)

Step 6. Make a Conditional Branch. Make the condition "talk randomizer is equal to 3".

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1022.photobucket.com%2Falbums%2Faf348%2FAPGDMA%2Ftut6.png&hash=afd7025917ffc3f87929e9e9c151879b8b6266b1)

Step 7. Make a Conditional Branch. Make the condition "talk randomizer is equal to 4".

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1022.photobucket.com%2Falbums%2Faf348%2FAPGDMA%2Ftut7.png&hash=84432f62654e5650239a6d9cacbf5889a3ccc2db)

Step 8. Your Event Commands list should look like this now...

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1022.photobucket.com%2Falbums%2Faf348%2FAPGDMA%2Ftut4.png&hash=3407e433af8fbd90d341c11e992f45d34a3db559)

Step 9. In each Conditional Branch just put in whatever you want the NPC to say or do.
End result...
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1022.photobucket.com%2Falbums%2Faf348%2FAPGDMA%2Ftut8.png&hash=8ccd129c24789a0bc51ae3ebc610f0728750be67)

If you have any questions just post.
I hope it helps!
:)

EDIT: You can also put all this in a Common Event and simply call it through an event when you need it. :D Mr_Wiggles
Title: Re: How to make an NPC talk somewhat randomly
Post by: Mr_Wiggles on January 20, 2010, 01:02:21 AM
You can make the event look cleaner if you unchecked the "set handling conditions" for the Conditional branches, since you don't have anything under "else".
Title: Re: How to make an NPC talk somewhat randomly
Post by: Blue on January 20, 2010, 01:07:08 AM
I know, but just in case a super-n00b (like me  ::)) asks "hey! how do I do that?"
Title: Re: How to make an NPC talk somewhat randomly
Post by: Mr_Wiggles on January 20, 2010, 01:11:11 AM
Ah ok then, yea this can be a useful tut, you might even wanna add that you can make it use a common event.
Title: Re: How to make an NPC talk somewhat randomly
Post by: Blue on January 20, 2010, 01:16:29 AM
What do you mean?
Title: Re: How to make an NPC talk somewhat randomly
Post by: Irock on January 20, 2010, 01:53:36 AM
I made this tutorial in 2007. (http://rmrk.net/index.php/topic,20364.msg256431.html#msg256431) :mad:
Title: Re: How to make an NPC talk somewhat randomly
Post by: Blue on January 20, 2010, 02:01:41 AM
Oh soz Irock.
I didn't realize (I didn't see it either...)
:-\