OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bedges on 05 Mar 2005, 14:12:48

Title: fade text out...
Post by: bedges on 05 Mar 2005, 14:12:48
is there any way of having a line of text - either cuttext or titletext or whichever - fade out, other than leaving it until it disappears on its own?

Title: Re:fade text out...
Post by: ACF on 05 Mar 2005, 14:22:21
At it's simplest, pause and TitleText an empty string:

~awhile
TitleText ["","PLAIN DOWN"]

I don't think there is a more complicated way...
Title: Re:fade text out...
Post by: bedges on 05 Mar 2005, 14:44:02
mmmwell (without wanting to appear to gripe) i had tried that before posting - it is the most logical way, one would think. but either because of the empty string or the title/cuttext layering, nothing happens...

if you've got it working, could you post the order of script - i would love to be proven gloriously incorrect on this one, as suddenly disappearing text is pretty much the last detail needing fixed in this soon-to-be-released beta ;)
Title: Re:fade text out...
Post by: Pilot on 05 Mar 2005, 16:01:27
From the comref:
Quote
titleText effect
Operand types:
    effect: Array
Type of returned value:
    Nothing
Description:
    Text title - argument in format ["text","type", speed] or ["text","type"] If speed is not given, it is assumed one.

Example:
    titleText ["Show this text", "PLAIN"]

By adjusting the speed of the titletext, you can adjust how long it stays up.  Assumed speed is one.  If one stays up too long lower the speed so it fades out quicker. ex:
Code: [Select]
titletext ["Text you want", "Plain Down", .5]
Title: Re:fade text out...
Post by: AK-Chester on 05 Mar 2005, 16:01:34
Afaik the "speed" parameter doesn't work with titleText (it's just ignored).

This works fine for me though.
Code: [Select]
titleText ["Blah","PLAIN DOWN"]
~5
titleText ["","PLAIN"]
Title: Re:fade text out...
Post by: macguba on 05 Mar 2005, 16:08:20
I've never found a way of getting a fade out.   Having a new titletext or whatever does make it disappear, but instantly.
Title: Re:fade text out...
Post by: bedges on 05 Mar 2005, 16:28:33
thanks to studentpilot i've worked it out - i had thought the speed controlled only the fade in duration, but as was pointed out, it also dictates how long the text is displayed for. a workaround is to utilise the layering of cut/titletexts thus:

Code: [Select]
titlecut ["You want some text to fade out?", "plain down",2]
~2
titletext ["You want some text to fade out?", "plain down",0.3]
~0.5
titlecut [" ", "plain down"]


there's a tiny jolt, hardly noticeable, but it works. thanks muchly :)