<Var/String> = The message you wish to display as a subtitle.
<Var/Number> = The length of time to display the subtitle in milliseconds.
This command displays a text string as a message along the bottom of the screen for the prescribed period of time.
When wishing to display objects in a subtitle message, the 'sprintf' command should be used to first convert the 'objects display text' into a string format. As 'objects' returned by most commands are in fact only 'pointers' to there location in memory, this needs to be converted into a format readable by humans.
Examples:
display subtitle text: text = 'I want this text displayed at the bottom of the screen for 3 seconds. duration = 3000 ms
-----------------------------------------
$player.credits = get player money
$player.credits.str = convert number $player.credits to string
$sub.message = sprintf: fmt = 'Congratulations on having %scr in your account.', $player.credits.str, null, null, null, null
display subtitle text: text = $sub.message duration = 3000 ms
This would display the congratulations message containing the players current credits as a subtitle for the required 3 seconds.
-----------------------------------------
$sector = [PLAYERSHIP] get sector
$sub.message = sprintf: fmt = '%s', $sector, null, null, null, null
display subtitle text: text = $sub.message duration = 3000 ms
As $sector is an 'object', it needs to first be converted into a string format before it can be displayed. Failure to do this will result in No message being displayed.
Note:
If you try to display multiple subtitles straight after each other without waiting for the previous one to be displayed, you will effectively overwrite all previous messages and only have the last one displayed.
Command Location:
- »» Audio Commands
- display subtitle text: text =<Var/String> duration =<Var/Number> ms