Using the text parser to play an AGS game

Started by AgsUser007, Thu 04/09/2008 06:56:14

Previous topic - Next topic

AgsUser007

I've been working with the text parser, and wanted to know how i'd be able to take an object by using the text parser?  I downloaded this "textparser v2.0 template" and it includes the yellow key on the floor, all with a walkable area and the key is also in a region.  But when you play the test game of just the template, you can walk over to the key, type in "get key" and Roger will take it.

Now I did notice it had a script name of KEY or something, but everywhere else I look for any other scripts, I come across none, and I don't see a KEY script.  It's in the object section for the room at the top there is a blank field labeled "Script Name" and in it is KEY or OKey, but from looking around for a KEY script I don't see any, the schema box is blank, and there are no options set in any of the interaction menus.

So i'm at another bind.  First, how do I make MY character pick the key up, and then have it show in the inventory?  And in my game, yes, I did go into the interaction menus and tried doing it that way, but I think that interaction menu is for point and click games.

Second, why in the test game is the key in a region?

In addition, my other thread about the custom characters not working correctly, please check it out and fill me in there.

Thanks! :)

Khris

I assume trying to take the key while standing outside the region will result in "You need to get closer."
The script is probably in the global script, since all parser stuff is handled in there.

Double-click the text field on the parser GUI in the editor and it should take you to the function that will process the entered text.

Laukku

Quote from: KhrisMUC on Thu 04/09/2008 08:51:09
The script is probably in the global script, since all parser stuff is handled in there.

Nope. At least in the template, all global commands are in global script, then if player input doesn't match with any of those, script of the current room is called.

AgsUser007, check the room script. And I recommend to use my enhanced version of that template instead, as it is much better IMHO.  :=
You are standing in an open field west of a white house, with a boarded front door.
>WIN GAME
Congratulations! You just won! You got 0 out of 500 points.

AgsUser007

Quote from: Laukku on Thu 04/09/2008 18:47:35

Nope. At least in the template, all global commands are in global script, then if player input doesn't match with any of those, script of the current room is called.

AgsUser007, check the room script. And I recommend to use my enhanced version of that template instead, as it is much better IMHO.  :=

Oh I didn't know you had made that template.  Very nice job, however I wanted to have the parser look almost exactly like the AGI parser.

But anyway, the only text parser script that i'm seeing, is under the Room Settings area, and then Edit Script.  That is where all of the code is, do I have to enter all my code in manually like that if I want it to be text parser?

magintz

Hehe yea, that text parser I made is very old, outdated and unrefined. The new one from Laukku should be used instead. My template was made more for people to understand how it works than for actual use.

I'll update the thread to stop this from happening.
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

Laukku

Quote from: AgsUser007 on Sat 06/09/2008 23:44:01
Oh I didn't know you had made that template.  Very nice job, however I wanted to have the parser look almost exactly like the AGI parser.
I made an improved version, not the original template itself.  :)

I guess that you can turn the parser back to AGI-like by looking how it worked in the old version and by removing and adding the approppriate scripts. But that's a bit complicated.

QuoteBut anyway, the only text parser script that i'm seeing, is under the Room Settings area, and then Edit Script.  That is where all of the code is, do I have to enter all my code in manually like that if I want it to be text parser?


The downside of using a parser is, that you can't put parser commands in character/object/inventory scripts. Everything has to be in Interface_Click, the room script and the NoMatch() function.
You are standing in an open field west of a white house, with a boarded front door.
>WIN GAME
Congratulations! You just won! You got 0 out of 500 points.

SMF spam blocked by CleanTalk