KDScript

KDShortText

ParameterTypeDescriptionDefault value
textstringname of the message from strings\short.str to display (if the Book→Text property is not set)
text_colorcolorcolor to display the message in0xffffff (white)
text_timetimehow long to display the message(calculated based on message length)
text_on_frobbooleanwhether to display the message when frobbedtrue
text_on_focusbooleanwhether to display the message when focusedtrue

When frobbed and/or focused, KDShortText displays text in an on-screen message of the specified color for the specified time. The Book→Text property, if present, gives the name of a message in the strings\short.str file; otherwise, the text parameter gives the name of the message. This structure allows for cleaner updating and translation of short readables without requiring a separate .str file for each.

If the text_on_frob parameter is true and the World Action of the object's Engine Features→FrobInfo property includes “Script”, the message will be displayed when the object is frobbed (clicked).

If the text_on_focus parameter is true and the World Action of the object's Engine Features→FrobInfo property includes “FocusScript”, the message will be displayed when the object is focused (highlighted/pointed to).

This script is part of the KDScript module. Copyright © 2012–2013 Kevin Daughtridge. See introduction for details.