Larry 7 template - Crits and Beta test

Started by Rui 'Trovatore' Pires, Sat 11/12/2004 00:00:17

Previous topic - Next topic

Rui 'Trovatore' Pires

I'm still a bit lost as to your suggestion regarding the room script, sorry...

And in repeatedly_execute_always I have... well, lots of stuff. A counter for the score, some code to make sure the menu pops up correctly, some code to highlight the cursor when over SOME GUI buttons (not all)... heh. Lots of stuff.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

RickJ

Quote
I'm still a bit lost as to your suggestion regarding the room script, sorry...
That's probably because I need to understand/study what you've done a bit more.   Where are you handling the menu click?  I assumed it was in interface_click() in the global script.  I'll keep looking and try to re-explain myself ;)

Quote
And in repeatedly_execute_always I have... well, lots of stuff. A counter for the score, some code to make sure the menu pops up correctly, some code to highlight the cursor when over SOME GUI buttons (not all)... heh. Lots of stuff.
Ok.  That's probably the only sensible way of over-riding the cursor's default behaviour and appearance.  I'm not sure about the other stuff you mention but I will keep looking. 

I you like, I can take a look at whatever progress you are making.  Just let me know when and where I can get an update.

Keep up the good work.




Rui 'Trovatore' Pires

Oh, at the mo I'm not working on it. I'm taking advantage of the break proportioned by the little problem with restart/restore in the latest beta to organize my real life, and am treating this thread as a to-do list which I'll pick up on as soon as the next beta/final is released.

I handle menu clicks in interface_click, yes... what happens in, when the player chooses a verb, the interface_click function calls up the DoStuff() function. That one basically parses the verb the player has chosen (said verb being a string previously defined by getting the name of the listbox item) and runs the MODE_USE interaction for the object/character/hotspot/inventory selected, where a "Said" command is waiting for the parsed verb. I did it like this so as to minimize scripting for the user, as odd as that may sound when considering some things in that template ;) ; the user would only have to open the correct interaction mode (USE) in the interaction editor and add whatever interactions he wanted with several "Said" commands.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

RickJ

Quote
Oh, at the mo I'm not working on it. I'm taking advantage of the break proportioned by the little problem with restart/restore in the latest beta to organize my real life, and am treating this thread as a to-do list which I'll pick up on as soon as the next beta/final is released.
Ok.  As long as youtake my comments as "food for thought" rather than "commandments".   :)

[quoe]
I handle menu clicks in interface_click, yes... what happens in, when the player chooses a verb, the interface_click function calls up the DoStuff() function. That one basically parses the verb the player has chosen (said verb being a string previously defined by getting the name of the listbox item) and runs the MODE_USE interaction for the object/character/hotspot/inventory selected, where a "Said" command is waiting for the parsed verb.
Quote
So then you're saying that the interaction editor can then be used to pickup the
"Said" command and implement the action? 

Quote
I did it like this so as to minimize scripting for the user, as odd as that may sound when considering some things in that template Wink ; the user would only have to open the correct interaction mode (USE) in the interaction editor and add whatever interactions he wanted with several "Said" commands.
If I understand correctly, this accomplishes what I was suggestingwith the CallRoomScript() thingy but with the interactiion editor instead of the room script. If this is so it's quite clever and something I would never have thought of. 

So do you do a ParseText(menuu_text); in the global script  and then do a series of "if (Said("...")) { }s" inthe room script or interaction editor?  Clever!  What triggers the event then?

Rui 'Trovatore' Pires

QuoteSo then you're saying that the interaction editor can then be used to pickup the "Said" command and implement the action? 

That's just what it does, yes.

QuoteWhat triggers the event then?
Not sure if I understand the question, but if I do, it's selecting a verb in the listbox that triggers the whole works. And the thing that triggers calling the interactions in the editor is the RunHotpotInteraction (or character[].RunInteraction, or whatever) inside the function DoStuff(), called by clicking on the listbox.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

RickJ

Quote
Not sure if I understand the question, but if I do, it's selecting a verb in the listbox that triggers the whole works. And the thing that triggers calling the interactions in the editor is the RunHotpotInteraction (or character[].RunInteraction, or whatever) inside the function DoStuff(), called by clicking on the listbox.
Ok, I understand what you're doing now and I think it's pretty clever.  I think you will need a brief explanation of this in the release.   What do you do then if there are more actions than modes or if they are non-standarrd?   

This also explains why my suggestion about the CallRoomScript() didn't make sense to you.  You had already accomplished what I was talking about using this method. 

Rui 'Trovatore' Pires

QuoteWhat do you do then if there are more actions than modes or if they are non-standarrd?Ã, 

Ok, if I read you well, it doesn't really matter, because whether the player has clicked on a default or a custom verb, the result is the same - the verb's name is extracted and parsed. In the demo, if (Said("swim")) works perfectly, and stuff like that is all you need to do, apart from making sure the verb is also in the vocab list.

Now that the latest beta is off, I'm converting the whole thing to this new system, plus fixing a coupla bugs and adding the ability to, Windows-style, let those USE and OTHER menus pop up if the mouse is some time over the option, even if the player doesn't click. After that, I'll implement the things in this thread, starting with COMMENTING the darn thing. ::)

EDIT - "More actions than modes" never happens, because only the MODE_USE is ever called.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

RickJ

Quote
"More actions than modes" never happens, because only the MODE_USE is ever called.
OK, so you then have the "Use" interaction function with a series of if Said()s? 

Quote
Now that the latest beta is off, I'm converting the whole thing to this new system, plus fixing a coupla bugs and adding ....
If you need any help with the object stuff or want me to look at something jusyt let me know..

Quote
After that, I'll implement the things in this thread, starting with COMMENTING the darn thing.
One tip about generating comments, I prefer doing it at the same time I am producing code.  I find that it is less burdensome this way and often contributes to the coding process by being a kind of mini-design document and keeping me out of trouble.

Rui 'Trovatore' Pires

QuoteOK, so you then have the "Use" interaction function with a series of if Said()s? 
Precisely. And a "Use Inventory On" interaction too, come to think of it - I haven't made a default response for that. I'll have to remember to add it, maybe using unhandled_event.

QuoteIf you need any help with the object stuff or want me to look at something jusyt let me know..
Thankya, I sure will! But I hope that won't be necessary. ;)

And about comments... heh. I don't like writing them AT ALL, and when I DO they're usually things only I can understand... maybe I can find someone to turn whatever comments I turn out this time into REAL comments. :P
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

RickJ

Quote
... maybe I can find someone to turn whatever comments I turn out this time into REAL comments...
I can do some of that for you.  We should just mske it part of a review process.  That way I'll understand what you are doing and will have an opportunity comment.   We seem to be getting along so far ...  ;D
 

Rui 'Trovatore' Pires

#30
All right, deal! I'll keep making my own comments, which are probably too obscure to most non-scripters but which you'll probably make heads or tails of - especially since you seem to be familiarizing yourself with it. Then I'll upload it and PM you, and you give it the once over, see if it works, what it looks like, and add the comments. And feel free to optimise whatever you think's needed, naturally.

EDIT - I decided not to add the text-property-thingie you mentioned, RickJ. It's an extra bulk that looks nice, but isn't really practical when you consider that without it you only need one place for coding everything, namely the "Interact with (whatever)" in the interaction editor.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

SMF spam blocked by CleanTalk