Showing posts with label debug. Show all posts
Showing posts with label debug. Show all posts

Wednesday, 12 September 2007

Debug Text=1

Script exceptions can be seen all of the time by changing the nwn.ini in the directory where NWN2 is installed. There is a setting for Debug Text=0. Change it to Debug Text=1. Also make sure DebugMode is set to 1. I highly recommend this change for anyone doing scripting so you don’t have to enable seeing exceptions every time you test. Each time the game is patched the nwn.ini gets overwritten so be sure to reapply this change. The settings may work in the My Documents nwn.ini so it won't get overridden, I haven't tried that.
Source

My notes on this, I am trying it out.

Sunday, 9 September 2007

FloatingTextStringOnCreature ONLY works on PC

Remarks

This function seems to be most useful for notifying PCs (and possibly their party) of in game effects (detections, environmental perceptions, etc), and not as a way to facilitate PC-to-creature communication. For instance, if a PC passes a Listen check they could be notified via Ambient Text (“You hear footsteps coming down the hall”). Other uses could include Onomatopoeia originating from the PC (“Snap!”, “Cough!”, “Hick!”) and brief game feedback (simulate an overheard conversation, time from a sundial, item status, etc).

This function will not work on placeable objects of any kind, and text targeted to NPCs will never be visible to PCs. You can simulate text coming from a sign, sundial, or any other placeable object by floating it above the PC you want to notify, as long as the PC is near to the object when the text will appear.
Source: NWN Lexicon


NOTE But you can use SpeakString() - Am going to test this for placeables, particularly signs, as well as creatures. It floats the text so is a good replacement. Search for an entry later on this.
Update: It does work, it gives the name of the placeable in square brackets followed by the text of the SpeakString. Text floats upwards.

Wednesday, 5 September 2007

Tip: Debug using SendMessageToPC

//Debug String
SendMessageToPC(GetFirstPC(), "value of global int intValue is " + IntToString(intValue));