DisplaySpeechBackground suggestion/enquiry

Started by Kinoko, Tue 12/10/2004 16:00:07

Previous topic - Next topic

Kinoko

I remember talk of modifying DisplaySpeechBackground to include x and y positioning (so, possibly a DisplaySpeechBackgroundAt?) and automatic removal after a period of time. If these haven't officially been added to a suggestion list, then I'm doing so now ^_^

strazer

#1
Does this work?:

function DisplaySpeechBackgroundAt(int charid, string message, int x, int y) {
  int overlay_id = DisplaySpeechBackground(charid, message);
  MoveOverlay(overlay_id, x, y);
}

As for auto-removal, it's on the tracker:
http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=488

Radiant

Or, simply add a timer to your display... function, then put code in RepEx(Always) to remove the relevant overlay.

Kinoko

strazer: Seems fine, but would it work for multiple displays on screen in different posistions, starting at different times, being displayed at once? Just thinking about naming the int there... it'd give that name to multiple instances of the function, wouldn't it? Not sure ^_^;

Radiant

Have you tried using CreateTextOverlay instead?

Kinoko

I'm sure I could get it to work okay, but it's just incredibly messy for what I'm doing with this, when having DisplaySpeechBackground be a little more customisable would be so perfect. I'd just like to make that suggestion. If it doesn't go through, then I'll go the long way around out of necessity.

I'm not trying to sound demanding... ^_^ It would just be nice.

strazer

Quote from: Kinoko on Wed 13/10/2004 07:24:59
strazer: Seems fine, but would it work for multiple displays on screen in different posistions, starting at different times, being displayed at once? Just thinking about naming the int there... it'd give that name to multiple instances of the function, wouldn't it? Not sure ^_^;

I'm not sure what you mean. It should display multiple overlays just fine.
If you're talking about overlay_id, it's a variable local to the function. You can add
return overlay_id;
to the above function so it returns the overlay number.

You could then use arrays or something and, as Radiant said, rep_ex to remove the overlay yourself.
Or you wait until auto-timeout for background speech is implemented. As I said, it's on the tracker.

SMF spam blocked by CleanTalk