Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Text game problems, please help : )

Author
Message
Chenak
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 16th Jul 2003 22:52
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.

Once you start down the Dark Path, forever will it dominate your destiny...
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 16th Jul 2003 23:02
http://www.planet-stuff.freeserve.co.uk/Software/Eliza_Basic.htm

is a start, cheers.


Mentor.

Login to post a reply

Server time is: 2026-07-21 12:50:41
Your offset time is: 2026-07-21 12:50:41