Jump to content

Photo

ZScript: String Table Processor and Message Display w/Sound

string message music cutscene

  • Please log in to reply
No replies to this topic

#1 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 16 October 2018 - 02:02 AM

Apparently I've gone utterly mad.

 

Here's another rather complex script, that allows the user to create a string table entirely in ZScript, cache the strings, and quickly extract them.

 

Once the user selects a string from their table, they can show it as a message on the screen, use it as a raw string for any application--or, the user can run it through a print utilitiy that's designed to create custom message boxes, with backgrounds, and to play sound effects, and dramatic music.

 

Mind you, this is nowhere nearly as complex as Tango, but for that very reason, some users may find it helpful. I designed the string processor screen print utility to accept a base string, and a number, where that value is the number of contiguous strings to display, each when the user presses a button, in series.

 

This could be useful for long cutscenes, backstory, intro text, and the like. The print utility allows the user to select a style, from either a base style, or a user-defined style; and I designed designed the scripts in such a way that I redcuced the mandatory number of global arrays to three. (One olf these is used as a general buffer, and the other as a cachine pool to store positions in the massive string table.)

 

The last is the string table itself. I could probably refine this down to a function, but I think that faster memory access is wsorth the expense. In theory, you could store hundreds of pages of text using this mechanism.

 

Feel free to hav e a look.





Also tagged with one or more of these keywords: string, message, music, cutscene

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users