Adventure Game Studio | Forums

AGS Support => Advanced Technical Forum => Topic started by: Dave Gilbert on 13 Jan 2018, 21:40

Title: Text appears over the wrong character [Solved. Kinda?]
Post by: Dave Gilbert on 13 Jan 2018, 21:40
Hi all. I have a sneaking suspicion that I'm missing something obvious here.

I have four characters, all with the same view number. They are alien creatures with slight tinting applied to differentiate them. They are called "ligamentals," so their script names are cLig1, cLig2, cLig3, etc.

My issue is that whenever any of them speak, the text always appears over "cLig1". Each of the aliens uses a different text color, and the text color changes depending on who is speaking, but the text position remains the same.

See this video for an example of what I mean:



I've scoured the code and can't think of any reason why this happens. I can animate, move, change the transparency, etc of each of the aliens using their proper script name. I can do everything except make the speech text appear where it is supposed to.

Any light-shedding is appreciated!

-Dave
Title: Re: Text appears over the wrong character
Post by: selmiak on 13 Jan 2018, 22:20
have you tried giving them totally different names from each other, like cBob, cRoger, etc? if that solves it, maybe cLig_a, cLig_b, etc works as a workaround.
Title: Re: Text appears over the wrong character
Post by: Snarky on 13 Jan 2018, 22:35
Is it a plain Character.Say() call, or are you using any kind of custom function?
Title: Re: Text appears over the wrong character
Post by: Cl... on 13 Jan 2018, 22:52
They are now a hive mind with a single spokesman. Canon.
Title: Re: Text appears over the wrong character
Post by: Dave Gilbert on 14 Jan 2018, 11:36
@selmiak: I tried changing the first three to cHewey, cDewey, and cLouie but the same thing happened.

@Snarky: I do use a custom say function, but all it does is check for emotional states so I can change the talking portrait. The aliens don't even USE talking portraits.

I have done the "characters designated by numbers" thing elsewhere in the game. There's a nightclub near the beginning with several goths outside it. The characters are named cGoth1, cGoth2, cGoth3 and there is no problem there. The only difference I can see is that the aliens all use the same view. As a test, I assigned the aliens different views but the same problem occurred.
Title: Re: Text appears over the wrong character
Post by: Crimson Wizard on 14 Jan 2018, 11:40
@Snarky: I do use a custom say function, but all it does is check for emotional states so I can change the talking portrait. The aliens don't even USE talking portraits.

So, you are using Sierra-style speech. Do they have a dummy speech views assigned or none at all?
Also, will it change anything if you move these characters to different locations?
Title: Re: Text appears over the wrong character
Post by: Dave Gilbert on 14 Jan 2018, 12:10
No dummy speech views. There are no speech views at all.

I managed to find a work around. I added an IF statement to my custom Say function that checked if a character used this particular view in this specific room, and then used a SayAt function to place the line in the correct place.

(http://www.unavowed-game.com/temp/speechthing-solved.png)

Bit hacky but it works. Still curious why it happened in the first place, though!
Title: Re: Text appears over the wrong character
Post by: Crimson Wizard on 14 Jan 2018, 12:17
Bit hacky but it works. Still curious why it happened in the first place, though!

Did you try changing character locations, like spreading them out?

I had a suspicion that in "Sierra" mode Say command has a stricter limit to how close to the screen border the text can be.
Title: Re: Text appears over the wrong character
Post by: Dave Gilbert on 14 Jan 2018, 12:23
Yep. I tried that as well. Same thing occurred. I've used the say command for non-portrait characters in many other places throughout the game (for minor characters with 1-2 lines that I can't bother getting a talking portrait for) and never encountered this issue before. So there is something unique about this scenario that I can't figure out!

EDIT: Huh. As a test I set the speech style to lucasarts before each of these alien characters spoke, and the problem went away! So yes, the issue definitely has something to do with Sierra style speech.

EDIT2: It might also have to do with the fact that this is a scrolling room? Dunno. :)