I was thinking that perhaps this program should be added to the links: Lilac Soul's Script Generator. However, since I am myself the creator of it, I don't want to risk being accused of self-promotion by adding it myself. What do others think? Lilac Soul 13:23, 23 April 2007 (UTC)
Could people please help to fill this in so we can migrate it to the script page.
Designed by | Bioware |
---|---|
Developer | Bioware |
First appeared | June 18, 2002 |
Stable release | |
OS | Windows |
License | Bioware EULA |
Website | Bioware Developers Portal |
Influenced by | |
C, Java |
Enigmatical 23:06, 25 April 2006 (UTC)
The exampe given currently as the "simplest" hello world script is actually a bit misleading and not the simplest way. A much simpler way both descriptively and codewise would be as follows:
void main()
{
object oPlayer = GetEnteringObject();
SendMessageToPC(oPlayer, "hello world");
}
This will display the text directly in the targetted players message\action log (In this case the player entering the trigger or area the script was attached to), which is as close as NWN comes to printing a message onto the screen itself.
The existing example is not only longer but it is entering the text as part of the players action queue, which would potentially interuppt the player's behaviour, be cancelled by the player or cause other issues, thus if the scripter wanted to display a message to the player this would be the least desirable method.
Other methods could include:
SpeakString() - Much as per existing example but it overrides the action queue preventing mistakes
FloatingTextOnCreature() - Causes larger letters to float about the target creatures head for a few seconds.
-- 86.152.0.199 ( talk) 14:18, 11 June 2008 (UTC) Ryuujin
(sorry for my bad english)
Datatypes: There are booleans - you just need to create an int and assign him TRUE or FALSE.
NWScript is also used in: The witcher bases on the neverwinter nights 1 engine, therefore the nwscript language is used in the witcher too! —Preceding unsigned comment added by 92.74.183.94 ( talk) 10:20, 14 March 2009 (UTC)
Booleans are not a datatype in NWScript. TRUE and FALSE are int constants. NWScript implicitly converts ints to booleans, with > 0 == TRUE and <= 0 == FALSE. The part of the page that says booleans are datatypes should be removed. 68.94.212.87 ( talk) 05:47, 24 August 2009 (UTC)
![]() | This redirect does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||||||
|
I was thinking that perhaps this program should be added to the links: Lilac Soul's Script Generator. However, since I am myself the creator of it, I don't want to risk being accused of self-promotion by adding it myself. What do others think? Lilac Soul 13:23, 23 April 2007 (UTC)
Could people please help to fill this in so we can migrate it to the script page.
Designed by | Bioware |
---|---|
Developer | Bioware |
First appeared | June 18, 2002 |
Stable release | |
OS | Windows |
License | Bioware EULA |
Website | Bioware Developers Portal |
Influenced by | |
C, Java |
Enigmatical 23:06, 25 April 2006 (UTC)
The exampe given currently as the "simplest" hello world script is actually a bit misleading and not the simplest way. A much simpler way both descriptively and codewise would be as follows:
void main()
{
object oPlayer = GetEnteringObject();
SendMessageToPC(oPlayer, "hello world");
}
This will display the text directly in the targetted players message\action log (In this case the player entering the trigger or area the script was attached to), which is as close as NWN comes to printing a message onto the screen itself.
The existing example is not only longer but it is entering the text as part of the players action queue, which would potentially interuppt the player's behaviour, be cancelled by the player or cause other issues, thus if the scripter wanted to display a message to the player this would be the least desirable method.
Other methods could include:
SpeakString() - Much as per existing example but it overrides the action queue preventing mistakes
FloatingTextOnCreature() - Causes larger letters to float about the target creatures head for a few seconds.
-- 86.152.0.199 ( talk) 14:18, 11 June 2008 (UTC) Ryuujin
(sorry for my bad english)
Datatypes: There are booleans - you just need to create an int and assign him TRUE or FALSE.
NWScript is also used in: The witcher bases on the neverwinter nights 1 engine, therefore the nwscript language is used in the witcher too! —Preceding unsigned comment added by 92.74.183.94 ( talk) 10:20, 14 March 2009 (UTC)
Booleans are not a datatype in NWScript. TRUE and FALSE are int constants. NWScript implicitly converts ints to booleans, with > 0 == TRUE and <= 0 == FALSE. The part of the page that says booleans are datatypes should be removed. 68.94.212.87 ( talk) 05:47, 24 August 2009 (UTC)