TextDisplayAddObserver: Difference between revisions
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
textDisplayAddObserver ( textDisplay, player ) | textDisplayAddObserver ( textDisplay, player ) | ||
textItem = textCreateTextItem ( "Hello World", 0.5, 0.5, "low", 255, 0, 0, 0, 1.0 ) | textItem = textCreateTextItem ( "Hello World", 0.5, 0.5, "low", 255, 0, 0, 0, 1.0 ) | ||
textDisplayAddText ( textDisplay, textItem ) | textDisplayAddText ( textDisplay, textItem )</syntaxhighlight> | ||
</syntaxhighlight> |
Revision as of 02:43, 20 May 2006
Description
This function adds a player as an observer of a textdisplay. This allows the player to see any textitems that the textdisplay contains.
Syntax
void textDisplayAddObserver ( textdisplay textDisplay, player playerToAdd )
Required Arguments
- textDisplay: The textdisplay to add the player to as an observer.
- playerToAdd : The player that should observe the textdisplay.
Example
textDisplay = textCreateDisplay () textDisplayAddObserver ( textDisplay, player ) textItem = textCreateTextItem ( "Hello World", 0.5, 0.5, "low", 255, 0, 0, 0, 1.0 ) textDisplayAddText ( textDisplay, textItem )