No problem, it doesn't bug me to help people
. You mean like this:
TYPE dialogue
response AS STRING
trigger AS STRING
ENDTYPE
randomize timer()
DIM dialogue( 10, 5 ) AS dialogue
DIM randomMessage( 10 ) AS STRING
randomMessage( 1 ) = "Random reply 1"
randomMessage( 2 ) = "Random reply 2"
randomMessage( 3 ) = "Random reply 3"
randomMessage( 4 ) = "Random reply 4"
dialogue( 1, 1 ).response = "good"
dialogue( 1, 2 ).response = "fine"
dialogue( 1, 3 ).response = "okay"
dialogue( 1, 4 ).response = "bad"
dialogue( 1, 1 ).trigger = "test"
dialogue( 1, 2 ).trigger = "testing"
dialogue( 1, 3 ).trigger = "tests"
dialogue( 1, 4 ).trigger = "test?"
DO
input ":", input$
hasFound = 0
FOR checkDialogues = 1 to 10
FOR checkTrigger = 1 to 5
IF lower$( input$ ) = lower$( dialogue( checkDialogues, checkTrigger ).trigger )
randomReply = rnd( 3 ) + 1
print dialogue( checkDialogues, randomReply ).response
hasFound = 1
ENDIF
NEXT checkTrigger
NEXT checkDialogues
IF hasFound = 0
randomResponse = rnd( 3 ) + 1
print randomMessage( randomResponse )
ENDIF
LOOP
Don't hesitate to ask more questions on how things work or how to do things, it's the best way to learn
.
EDIT: Oh, you posted while I was posted, well just try it yourself if you want then check it with mine
.