Friday, January 31, 2014

Dev Log: Horror Text Adventure #37

I fixed the verb command structure.  Now if the player types a game command such as /c or /quit, all it cares about is the first word there, like normal.  But if the player types anything else, it goes through the entire text looking for a verb.  So I suppose now, if the player wanted to be literary, he could type "I go east" instead of just "go east" and still arrive where he needs to go.  In my last dev log, the verb had to be the first word.

After finding the first verb, however, it stops looking for verbs.  So if you type "take key walk north" it'll only take the key and won't walk north.  When it came to checking directions, I had to make a similar check so if the player typed "walk east east" it didn't try to walk east twice.

I also added a line break between each directional sentence, so it's easier to read where you an go.  Took me a while to find where I put that info.  Sometimes things start to get a little convoluted.  Need more comments!

No comments:

Post a Comment