The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: Rukishou on March 18, 2007, 01:50:30 PM

Title: How to make a AI/NPC to say different everytime...?
Post by: Rukishou on March 18, 2007, 01:50:30 PM
HI! Can I use variables or something to randomize what the AI/NPC says out of a few set messages?

For example; maybe I want the AI/NPC to say either "Welcome back! :D" or "ARE YOU HERE AGAIN? D:<" (he has huge mood swings, xP). Can I make this hapen with variables or anything? PLease help! Thank you!! ^^
Title: Re: How to make a AI/NPC to say different everytime...?
Post by: :) on March 18, 2007, 02:00:08 PM
or just self switches, but ya if you think they are really going to go back and talk that many times use variables. but dont forget you can do alot more...

common events useing gold ...different ammount = different thing said.
Title: Re: How to make a AI/NPC to say different everytime...?
Post by: Rukishou on March 18, 2007, 02:09:57 PM
Quote from: Nouman on March 18, 2007, 02:00:08 PM
or just self switches, but ya if you think they are really going to go back and talk that many times use variables. but dont forget you can do alot more...

common events useing gold ...different ammount = different thing said.

yeah, sure... but stil I don't understand variables good enough ...
Title: Re: How to make a AI/NPC to say different everytime...?
Post by: Halestorm5 on March 18, 2007, 03:08:39 PM
I like helping. This is a way to make someone say to different things in a four part thingy :D
-----------------
1. Make a new single switch.
2. Make a conditinal branch and make it so that switch is on
3. In else make whatever their ment to be saying and then activate the switch
4. Under the conditinal branch put in what you want them to say later and thats what they'll say from there on. :D

(I only know this cos I've used it about 17 times now LOL!)
Title: Re: How to make a AI/NPC to say different everytime...?
Post by: Blizzard on March 18, 2007, 03:11:11 PM
Set a variable to a random number and according to that number let the NPC say something different each time. If you make like 3 or more possibilities it will already give your NPCs more life. ^__^
But if you want something like NPCs who kinda remember stuff, you should make it like Hale said.
Title: Re: How to make a AI/NPC to say different everytime...?
Post by: :) on March 18, 2007, 03:13:46 PM
a variable is 100000x mroe useful then switches.

Ok (my famous example)
guy tell's you to kill 3 ghosts and come back when your done to get prize...
after each ghost battle you can flip a switch...but hey that would take three switches!
so when you go back to the guy you would need three conditional branches checking for three switches!!! what a pain...

with varibles...

after each ghost battle just use event command change variable, Name it "Ghost" and after each battle make it go up 1.

so now when you go back to the guy you need only 1 coditional branch checking ir variable ghost = 3.

;)