Narrator Text(I messed it up, help me unmess it)

Started by Dualnames, Fri 24/10/2008 09:20:47

Previous topic - Next topic

Dualnames

Ok, well, first I'm using AGS 3.02, I'm using a 640x480(low-res coordinates(320x200)) resolution, the backgrounds are 320x200, I'm using lucas arts speech style.

Problem: I'm having a narrator that has an empty 1x1 normal view, baseline = 480, clickable,solid=false, and his only visible when he's talking. Also I'm using this part of the code in the rep_exec section of the global script:

Code: ags

if (player.Room!=cNa.Room){//script name of the narrator is cNa
NewRoomNPC(player.Room,cNa.x,cNa.y);
}
//the above line just transports narrator to the players room so that when he talks he can be seen.

//also the below lines set narrators position if the room is scrolling/able
cNa.x=GetViewPortX()-280;//or something similar anyway..


So when I want something to be said by the narrator I use this:
cNa.SayAt(40,cNa.y,100,"whatever");

-So what's the problem:
Well, narrator's position is fine, everything seems to be fine but the way text is displayed.
It doesn't go over the narrator, but it gets wrapped up..

Example:
                   Big day today
NARRATOR  so anyway I was
                   walking down the
                   street singing do                                                 <Screen Edge(320)
                   ah die dieadadsd
                   and the fish went dea.


And when I use bigger width than 100:
It appears like this:

  NARRATOR   Big day today so anyway I was  walking down the street singing do ah die dieadadsd  <Screen Edge(320)
                                                        and the fish went dea.

Instead of that I want to have something like this:


  NARRATOR   Big day today so anyway I was  walking down the street singing do ah  <Screen Edge(320)
                     die dieadadsd  and the fish went dea.

I don't mind reshaping all my code, if it has to. So any ideas are welcome.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Khris

With LucasArts speech style, the text is always centered. I'm pretty sure one can't change that.

Dualnames

Quote from: KhrisMUC on Fri 24/10/2008 12:16:51
With LucasArts speech style, the text is always centered. I'm pretty sure one can't change that.

Well, in case you want to see what I'm talking about you can check the HHGTG demo. So what you're saying is that I can't do it like I want to.. it's weird though because in Sierra Style Speech..the text gets wrapped up better but I'm assuming that is because of the text window?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Lt. Smash

you could try game.speech_text_align = eAlignLeft.

Dualnames

Quote from: Lt. Smash on Fri 24/10/2008 13:38:15
you could try game.speech_text_align = eAlignLeft.

I assume that this works with lucas arts speech?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Lt. Smash


Dualnames

Ok, that might do the job, I'll give it a go and tell you about it.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Khris

Damn, I should stop posting BS without looking at the manual... :-\
Sorry.

QuoteSets how text in Lucasarts-style speech is aligned. Same possible values as game.text_align, default eAlignCentre

Dualnames

So wondering if I increase the width from 100 to 233 and set lucas arts speech will it work?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Trent R

I was thinking that I read something in the manual that will return how long a string is in pixels.... but I can't find it. Maybe I'm smoking something :(

If it does exist, you could use that to set the width.


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

SMF spam blocked by CleanTalk