Page 1 of 1

Multiple Text Popups?

Posted: Tue Feb 10, 2009 7:52 am
by Sky_216
Well, here's a little problem:
In the RPG I'm making, there are several times when I'd like a 'dialogue' or series of popup text screens (objective popup screens, such as in campaign) in sequence. Unfortunately, with just putting them one after (see example below) they just overwrite each other so only the last shows up. anyone know how to get around this?


Example (for intro bit):
Hidden/Spoiler:
onfirstspawn = OnCharacterSpawn(
function(character)
if character == 0 then

ReleaseCharacterSpawn(onfirstspawn)
onfirstspawn = nil
BeginObjectivesTimer()
ScriptCB_EnableCommandPostVO(0)
ShowObjectiveTextPopup("level.sr1.beach")
ShowObjectiveTextPopup("level.sr1.beach2")
ShowObjectiveTextPopup("level.sr1.beach3")
ShowObjectiveTextPopup("level.sr1.beach4")
ShowObjectiveTextPopup("level.sr1.beach5")
end
end)

Re: Multiple Text Popups?

Posted: Tue Feb 10, 2009 11:00 am
by Maveritchell
What I'd do (and this is no guarantee of efficiency) is use a series of timers to space the popups apart by a certain time. You can even "freeze" the unit's movement while the text is taking place, if you want (unit speed can be edited without forcing a respawn).

Re: Multiple Text Popups?

Posted: Tue Feb 10, 2009 6:04 pm
by Sky_216
Maveritchell wrote:What I'd do (and this is no guarantee of efficiency) is use a series of timers to space the popups apart by a certain time. You can even "freeze" the unit's movement while the text is taking place, if you want (unit speed can be edited without forcing a respawn).
Heh, timers were first thing I thought of too. any idea what the minimum timer time is?

Re: Multiple Text Popups?

Posted: Tue Feb 10, 2009 6:10 pm
by Maveritchell
The minimum isn't large enough to worry about. (I do not know the lower limit but it is well into small fractions of a second at least.)

Re: Multiple Text Popups?

Posted: Tue Feb 10, 2009 7:26 pm
by [RDH]Zerted
The timers aren't designed to be used for small increments and aren't guaranteed to be exact. I would be hesitant to use a timer for less than 2 seconds and would never go below 1 second. The docs even mention this.

Re: Multiple Text Popups?

Posted: Tue Feb 10, 2009 7:50 pm
by Maveritchell
[RDH]Zerted wrote:The timers aren't designed to be used for small increments and aren't guaranteed to be exact. I would be hesitant to use a timer for less than 2 seconds and would never go below 1 second. The docs even mention this.
I know that the docs say not to use them in small increments, however - I'm not positive, but - I'm pretty sure I've been told of microtimers working without much of a problem before. I know I've used them for the same thing I was recommending in the first place, though, so that's why I made the suggestion.

Re: Multiple Text Popups?

Posted: Tue Feb 10, 2009 8:50 pm
by Frisbeetarian
It worked fine for me while playing around with SetEntityMatrix. From that topic:
Frisbeetarian wrote:The only problem I can foresee with this is that it requires constant Lua work as the timer runs every hundredth of a second to reset the matrix to make the motion fluid. If you know of a way to access the frame speed, I can just use that for the timer amount, since a hundredth of a second is much shorter than I actually need.

Re: Multiple Text Popups?

Posted: Tue Feb 10, 2009 9:03 pm
by Eggman
Man, I wish I had thought of using timers for this in my last map. For the instances where I had multiple pages of dialogue, I just attached one popup to the completion of an objective, and the other on the start of the next objective. It worked well enough for me, but that method is only any good if you're using the type of objective sequence from the shipped campaigns. Plus, the length of time between the popups is a bit longer than I'd have liked it to be.