Lesson 1 will walk you through the basics of NWScripting. I will assume that you are fimilar with the Toolset (i.e. able to create modules and add placeables, etc).

These lessons were originally constructed using Neverwinter Nights 1, but are currently being revamped for NWN2.

If you have any questions regarding the lessons then please post your question(s) on the forums.

First thing to look at is exactly where do scripts go. You can attach scripts to items, creatures, doors and of course the module itself.

To attach scripts to the module itself, open the Toolset and then click on View, then Module Properties.

On the right hand side you can see all the different events that you can attach a script at the module level.



For example On Player Death Script you can add a script here that will fire up if a player character dies so that you could have the player teleported elsewhere or do any thing you want.

To see what a script looks like, click on the downward arrow to the right of any event that has a script associated to it and click on the open button as shown below:

Creatures also have scripts, so paint a creature into a test area and then right click on the creature, then properties. In the scripts part of the properties there is a list of events, which are pretty much self explanatory. For instance, if you wanted a particular event to happen if this creature died then you would add a script to the On Death event.



If you painted a placeable on to our area and right click on the placeable, then properties and looked at the scripts. Again, the placeable will have its own events that can be scripted. You will also note that depending on the type of object (whether it be a creature, trigger, item or a placeable, etc) you will get different list of events for each type.

As you can see finding and placing scripts is really easy and that wraps up lesson 1.