ScrollingDialog script module BETA thread

Started by monkey0506, Mon 05/09/2005 21:44:10

Previous topic - Next topic

Rui 'Trovatore' Pires

Quotesince Strings have no limit to size, you can store as much information as you want in any option

RIght-o. Though we still have the 300-char-per-line limit in the script editor. Just pointing it out for completion's sake.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

monkey0506

#21
Are you serious?  I never knew that...but you can spread strings across several lines if you know what you're doing. :D

Edit:

Quote from: Removed from the first postWell...that was crazy. No...in retrospect it was just stupid.

I've released several half-baked versions of this module that don't really do anything. And I feel like an idiot for doing it too. It makes me look like a very mediocre programmer.

This is now up to version 1.0 as of 31 July 12:14 A.M. And it actually works now. However, there have been some major revisions and simplifications, so I'll cover here what the module does and doesn't (since there's not any documentation in the package right now and I'm about to go to sleep).

There are actually two modules: the ScrollingDialog_Setup module, and the ScrollingDialog module. This was suggested by someone somewhere along the way to separate where the user actually sets up the dialog text and interaction events from the module scripts, however I've noticed a problem with it.

Because ScrollingDialog_Setup (where the user defines dialog text and interactions) has to come before ScrollingDialog (which currently isn't enforced by any type of macros or anything and will just generate compiler errors) you can't call any of the functions defined in ScrollingDialog. I am now considering putting it back so that the user can call these functions. Actually, all that would need to be moved was the setting up of the interactions.

Anyway, the user has access to the following functions:

Code: ags
static ScrollingDialog_OptionState ScrollingDialog.GetState(int topic, int option);
static bool ScrollingDialog.SetState(int topic, int option, ScrollingDialog_OptionState state);
static String ScrollingDialog.GetText(int topic, int option);
static void ScrollingDialog.Run(int topic);
static void ScrollingDialog.End();
static void ScrollingDialog.RunInteraction(int topic, int option);
static int ScrollingDialog.GetRunning();
static int ScrollingDialog.GetOptionOnLabel(int label);
static bool ScrollingDialog.GetSay(int topic, int option);
static void ScrollingDialog.ScrollUp();
static void ScrollingDialog.ScrollDown();


Hopefully those are all self-explanatory enough.

There's already some stuff leftover in the ScrollingDialog_Setup module that should help with getting your first dialog set up.

And I should cover some things that have been removed.

- There is no option to number dialog options.
- There is no option to make dialog options go upward on the GUI.
- There is no used option color.

Also it's worth noting that you can't have any multi-line options any more. You can store as much text into the dialog options as you want, however, when they are displayed on the labels they are automatically truncated to fit onto the label with an ellipsis appended at the end. When retrieving the text the full text will be restored.

Once again I'll bump this thread. However I have a legitimate reason this time seeing as I actually wrote a version of the module that works:

Version 1.0 released!

It pretty much emulates the original workings of the template. So that's good. I'll be working on implementing things like multi-line options, numbering options, used option color, etc. But the core system for scrolling dialogs is there now. Finally. And it's time for some much needed rest.

Btw, I came up with a solution to the interaction problem. If the user needs to call module functions from within the interaction for the dialog option, they can place their interactions directly into the ScrollingDialog module's script. Otherwise they can put their interactions in the ScrollingDialog_Setup module. (For more info on how to do this, just ask...)

SMF spam blocked by CleanTalk