...
NWScript has no way to directly target the screen for output. Instead, for instance, in-game characters such as the player character can be made to speak the typical “Hello world” example message. This script puts a “Hello world” message in the player’s message log. For it to work, it should be placed in the OnClientEnter event of the module’s properties.Void
| Code Block | ||
|---|---|---|
| ||
void main() |
...
{ |
...
SendMessageToPC(GetEnteringObject(), “Hello world”); |
...
} |
The first line is the void main function which is the function that a NWScript will start at. In the third line, the text Hello world is sent to the player’s in-game message log.
...