Hi there, i'm making a text game for a friend and i need a little help.
What im trying to do is produce a function that displays text if you type in a question. So if you type in "What is your name" it will return "My name's Andy" or something like that. But the thing i need is a function that looks for particular words within a string so if you enter "What are your hobbies" it searches for the key words "what" and "hobbies" and returns "my hobbies are..."
An example of what i want to make is called P.A.M is is found on the matedit website (
http://www.matedit.com)but unfortunatly it doesnt come with source code.
The code i got so far is below but it doesnt work properly.
function enterfunc(word$,s$)
length1$=right$(ntext$(),len(ntext$()))
length2$=left$(length1$,len(word$))
if length2$=word$
if returnkey()=1
txtentered=1
endif
endif
if txtentered=1
currtext$()=s$
endif
endfunctionOnce you start down the Dark Path, forever will it dominate your destiny...