Author Topic: npc text scripting  (Read 152 times)

0 Members and 1 Guest are viewing this topic.

aimaina

  • Administrator
  • Cutesterest
  • *****
  • Posts: 1106
  • Cutes: 124
    • View Profile
  • Pronouns: she/her
Re: npc text scripting
« Reply #15 on: August 28, 2018, 01:28:35 AM »
i think early versions of joogle had separate objects for every npc, which lets you use gml to describe the structure of conversations, but thats really unpleasant compared to a single configurable object

vgperson

  • Cuter
  • ***
  • Posts: 225
  • Cutes: 86
  • guess i'll have to... make them fall.
    • View Profile
    • vgperson.com
Re: npc text scripting
« Reply #16 on: August 28, 2018, 01:53:21 AM »
I thought that wasn't true, but it turns out you're right. (And those objects are still sitting in the final version for some reason?) That was Mitch's approach before I made it into the latter, which means they were also using show_message, which did... technically accomplish the "pausing until advancement" functionality.

My approach was also very messy. It had a "text" array containing the textbox messages, as well as an "act" array (except for some reason this one isn't an actual array: execute_string is used to find a variable named actX, where X is the line number??? Literally why could that not have been an array) which is executed by execute_string when each message box is shown. The latter could make branches happen by literally setting the "text" array to different messages. Libretta had a vaguely similar approach to branches, but like... a lot better than that.

Oh yeah, and Nakko-Bazookie did cutscenes in their own objects with an incrementing "stage" variable to accomplish actions between sets of messages (i.e. create text object with series of messages and set stage = 1; if object no longer exists && stage == 1, perform an action and set stage to 2...), but there were few enough that it wasn't so bad.

There were also Dabomstew's Pokemon fangame(s), which drew messages to the screen outside of the Draw function (which normally means it disappears in a frame or something)... then immediately "froze" the screen with a keyboard_wait loop before it would update again. Which is the true galaxy brain solution.
« Last Edit: August 28, 2018, 02:01:45 AM by vgperson »

hubol

  • Cutester
  • *****
  • Posts: 913
  • Cutes: 153
    • View Profile
    • hubolhubolhubol
  • Pronouns: he/him
Re: npc text scripting
« Reply #17 on: August 28, 2018, 12:20:04 PM »
Also, didn't know you were the person leaving typo reports on raocow's JIGGLY ZONE LP. The Mystery is Solve'd

i really appreciated that person's efforts--still working on the patch

wilde32

  • Cuter
  • ***
  • Posts: 102
  • Cutes: 10
    • View Profile
  • Pronouns: anything
Re: npc text scripting
« Reply #18 on: August 29, 2018, 03:02:06 PM »
I thought that wasn't true, but it turns out you're right. (And those objects are still sitting in the final version for some reason?) That was Mitch's approach before I made it into the latter, which means they were also using show_message, which did... technically accomplish the "pausing until advancement" functionality.

My approach was also very messy. It had a "text" array containing the textbox messages, as well as an "act" array (except for some reason this one isn't an actual array: execute_string is used to find a variable named actX, where X is the line number??? Literally why could that not have been an array) which is executed by execute_string when each message box is shown. The latter could make branches happen by literally setting the "text" array to different messages. Libretta had a vaguely similar approach to branches, but like... a lot better than that.

Oh yeah, and Nakko-Bazookie did cutscenes in their own objects with an incrementing "stage" variable to accomplish actions between sets of messages (i.e. create text object with series of messages and set stage = 1; if object no longer exists && stage == 1, perform an action and set stage to 2...), but there were few enough that it wasn't so bad.

There were also Dabomstew's Pokemon fangame(s), which drew messages to the screen outside of the Draw function (which normally means it disappears in a frame or something)... then immediately "froze" the screen with a keyboard_wait loop before it would update again. Which is the true galaxy brain solution.

warning: show_message crashes the game on some computers if you're in fullscreen mode. thanks game maker.

aimaina

  • Administrator
  • Cutesterest
  • *****
  • Posts: 1106
  • Cutes: 124
    • View Profile
  • Pronouns: she/her
Re: npc text scripting
« Reply #19 on: August 30, 2018, 09:11:47 PM »
like, in studio or the older versions? i think they say not to use show_message in studio except for debugging purposes or something but i didnt know it was that bad

wilde32

  • Cuter
  • ***
  • Posts: 102
  • Cutes: 10
    • View Profile
  • Pronouns: anything
Re: npc text scripting
« Reply #20 on: September 01, 2018, 08:21:39 PM »
yeah, studio.