Author Topic: A Talker for Ego/Print & "modeless" questions  (Read 11065 times)

0 Members and 1 Guest are viewing this topic.

Offline MusicallyInspired

Re: A Talker for Ego
« Reply #15 on: May 21, 2019, 05:11:29 PM »
Ok, bit more testing. I got the audio line to play, but my code for determining the tick-length seems flawed. Or DoAudio's audWPLAY function doesn't work how I expected. I passed audWPLAY's result into a local variable which I throw into the Print statements "ticks" value. But throwing a DebugPrint on that value reads the length as 414, which seems way too long as the Print statement's "ticks" value expects the length in seconds. It doesn't seem right for a cycle value either when I pass that value into the state's cycle length the window disappears too soon before the text is done. What exactly is this value that is being returned? Docs says it's ticks. You'd think "ticks" would mean the same thing as Print's "ticks" but it clearly doesn't...or I'm screwing up somehow.
« Last Edit: May 21, 2019, 05:18:10 PM by MusicallyInspired »
Brass Lantern Prop Competition

Offline Kawa

Re: A Talker for Ego
« Reply #16 on: May 21, 2019, 06:08:56 PM »
But throwing a DebugPrint on that value reads the length as 414, which seems way too long as the Print statement's "ticks" value expects the length in seconds. It doesn't seem right for a cycle value either
Narrator::startText sets ticks to 240 or the length of the string times twice textSpeed, whichever's larger, which Brian K. Hughes comments is "at least 4 seconds". startAudio sets it to whatever DoAudio returned. In either case, another 60 units are added.

Ticks are a 60th of a second.

Edit:
Quote
The term jiffy was used on the Commodore 64 and the Vic 20 to stand for 1/60th of a second (although Wikipedia claims it was either 59.94 Hz or 50 Hz). Tick has been used for the same purpose (basic unit of time) on other computers.
From https://english.stackexchange.com/questions/51860/is-there-a-word-for-a-60th-of-a-second

Offline MusicallyInspired

Re: A Talker for Ego
« Reply #17 on: May 21, 2019, 07:23:18 PM »
That's what I figured. So in other words a cycle, yes? But in either case it's the incorrect length for what Print "ticks" is looking for, strangely.

Dividing the result of "DoAudio audWPLAY" (which is said in the docs to return "the length of the sample in ticks") by "50" (not 60, for 1/60th of a second) seems to produce the perfect length needed for each line so far.
« Last Edit: May 21, 2019, 07:37:46 PM by MusicallyInspired »
Brass Lantern Prop Competition

Offline lskovlun

Re: A Talker for Ego
« Reply #18 on: May 21, 2019, 07:42:40 PM »
That's what I figured. So in other words a cycle, yes? But in either case it's the incorrect length for what Print "ticks" is looking for, strangely.
The ticks value is copied into a Dialog property called simply time and from there into a seconds property. So I think this is a simple mistake. It is more common to use the talkers/narrators for this kind of thing anyway.

Offline MusicallyInspired

Re: A Talker for Ego
« Reply #19 on: May 21, 2019, 07:50:05 PM »
But I haven't been able to figure out how to arbitrarily set Narrator text box positions/dimensions or allow animation to continue while the message box times out on its own in the background, ignoring user input. If I can do that that would make this all much simpler.

EDIT: So the "width:" method doesn't seem to do anything to Print. Is there something else I'm supposed to set for it to observe that? Just setting width to something just doesn't work.
« Last Edit: May 27, 2019, 01:51:19 PM by MusicallyInspired »
Brass Lantern Prop Competition

Offline MusicallyInspired

Re: A Talker for Ego/Print & "modeless" questions
« Reply #20 on: May 27, 2019, 01:53:35 PM »
Ok, a different question then. Is there any way to include an icon/view inside a gMessager window? There are 3 lines of dialog that I want to display icons inside, but I can't do it in with the previous method because the Print window ends up being too wide (the view isn't that big, I think it's just the text forcing the width) and so part of it gets overlapped by the dialog portrait.

I suppose I could just draw the view on the screen outside of the message window but if I can get it inside that'd be awesome. But seeing as it displays its content from the Message resource, I'm guessing no.
Brass Lantern Prop Competition

Offline Kawa

Re: A Talker for Ego/Print & "modeless" questions
« Reply #21 on: May 27, 2019, 02:56:39 PM »
As it happens, Talker::viewInPrint is a thing that should place the talking animated head inside the window.

I myself couldn't get it to work when I tried but I was a dumb noob back then who ended up hacking together those speech bubbles so what do I know?

Offline MusicallyInspired

Re: A Talker for Ego/Print & "modeless" questions
« Reply #22 on: May 27, 2019, 02:58:53 PM »
Interesting prospect. Not sure if it'll help me here, but at least we could have KQ5 Floppy style dialog boxes if we wanted.

I ended up just drawing the Views outside of the text box which works fine.
Brass Lantern Prop Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.031 seconds with 23 queries.