RPG Maker Forums

I hope this is the right place for this! I'm trying to create a script that pulls from three different random lists of phrases to construct random sentences for my NPCs, and I've run into a bit of a snag because I'm pretty new at Ruby. Here's what I've got so far (the dialogue is ridiculous, I know)


@name = "Marley"


@message_1 = "I just discovered",


"My favorite band is The",


"I really enjoy",


"I had a nightmare about",


"you look like a bunch of",


"Nobody but me has ever seen",


"Mainstream stuff is for",


"I'm not rude, society just consists of"


@random = rand(7)


@message_2 = " large",


" purple",


" orange",


" grotesque",


" scaly",


" smelly",


@random = rand(5)


@message_3 = " pustules",


" dolls.",


" eggplants.",


" buffalo.",


" airplane hangars",


@random = rand(4)


$game_message.add(@name + ": " + @message_1[@random]+ @message_2[@random]+ @message_3[@random])


I'm just getting back the same four sentences, ("I really enjoy orange eggplant," "My favorite band is The purple dolls," "I just discovered large pustules," and "you look like a bunch of scaly airplane hangars." None of these is particularly ideal. Does anyone have any suggestions or pointers? I'm pretty stuck.


Thanks so much!

Screen Shot 2016-10-02 at 3.37.39 AM.png

Latest Threads

Latest Profile Posts

Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect
I have gathered enough feedback from a few selected people. But it is still available if you want to sign up https://forums.rpgmakerweb.com/index.php?threads/looking-for-testers-a-closed-tech-demo.130774/

Forum statistics

Threads
105,992
Messages
1,018,189
Members
137,771
Latest member
evoque
Top