Jibble

Author Topic: [SOLVED] Speech not on top of player  (Read 187 times)

[SOLVED] Speech not on top of player
« on: 12 Nov 2021, 19:03 »
Hiya!

So when my player is close to the left or right border of the room and he says something, The speech text doesn't appear on top of him but is shifted left or right, depending on the character position, like if the speech text doesn't want to go beyond some invisible border from the center.

I've found a topic talking about an invisible narrator that would follow the player but didn't understand it and it didn't work for me.
Scripting is as far on the other side of me as a thing can be, but I did this thing:

Code: Adventure Game Studio
  1. function hBed_Look()
  2. {
  3.   player.SayAt(player.x - 250, player.y - 500, 500, "I don't need to sleep right now");
  4. }
  5.  

And it works.

I don't mind copy/paste the thing every time but I wonder if there's a way to make the speech x and y values based on the player position something permanent?
Perhaps in the Global Script?

Cheers!  :)
« Last Edit: 26 Nov 2021, 16:14 by Rik_Vargard »

arj0n

  • Mittens Vassal
  • art consists in drawing a line somewhere
    • arj0n worked on one or more games that won an AGS Award!
    •  
    • arj0n worked on one or more games that was nominated for an AGS Award!
Re: Speech not on top of player (Half Solution)
« Reply #1 on: 12 Nov 2021, 23:13 »
The invisible narrator is probably an invisible (transparent) character (like an npc) that always follow the player via Character.FollowCharacter.
This narrator will have the speech text instead of the player him/her self.

for example:
cNarator.FollowCharacter(player, 20, 80);

just play a bit with the 2 values to find the best fit for your situation.
In the example case, if the player character stands (close) to a left or right hand room edge, cNPC will never stand at that same spot, avoiding the issue that the speech text doesn't appear on top of him (the narrator).

Re: Speech not on top of player (Half Solution)
« Reply #2 on: 13 Nov 2021, 14:59 »
Hey thank you for the reply!

The ghost thing didn't work for me so I tried some stuff that didn't work neither.

But then I went to the general settings and tested the speech options and the Lucasarts speech fixed the whole problem just like that!
Now the speech shows up nicely on top of the player.

Thanks again! :)

Re: Speech not on top of player (Half Solution)
« Reply #3 on: 13 Nov 2021, 15:26 »
But then I went to the general settings and tested the speech options and the Lucasarts speech fixed the whole problem just like that!
Now the speech shows up nicely on top of the player.

Oh, I am guessing you had "Sierra with transparent background" on? In "Sierra" case you are supposed to provide character portraits to be displayed at the side of the text, this is also why the text is limited to the center of the screen.

Re: Speech not on top of player (Half Solution)
« Reply #4 on: 13 Nov 2021, 17:47 »
Aha! I'm sure that was part of the problem! Good to know, thanks!

I had it set on "Wholescreen" wich gave me the same problem as the Sierra thing when I tested that one.
Luckily Lucasarts fixed the thing  :grin: