Random message generating

Goosebot
Hello everyone.
Pretty new to quest, really enjoying getting my head around it.
Firstly, I've had a scour through the forum and couldn't see this request before but if it has been covered already sorry in advance.

I'm trying to create a feature that would work sort of like a name generator. The player can push a button which then randomly selects from a list of words/messages I've predetermined and displays it, but there would be an 'A' and 'B' part to message (like First Name and Last Name, as a simple example).

I'm certain this feature would be easy enough to make I'm just strugging with where to start, can anybody point in right direction?
Thanks.

Goosebot

sgreig
This is pretty simple to do. In your example of first name last name, you would just create two lists, one for first names and one for last names. Then you just use Quest's random number function to pick a number between 1 and X (x being the number of names in the list) for each list, and then join the results together.

Using to generate phrases would be more difficult unless you didn't care if the phrase was just gibberish.

Hopefully that gives you an idea of where to start. I would give a code example but I've been away from Quest for awhile and my knowledge of ASLX is a little rusty.

Goosebot
Okay, I'll look into this! Usually able to find what I'm looking for in the menus after a bit of searching.
If anyone has done this before or has tips on avoiding hiccups would be a big help.
Ta

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums