Hardcore UFO wrote...
Is supposed to divine the coordinates of anything. It only fetches strings. That's what has me baffled at this point.
Pretty much every NWNX function works that way - they use those strings to pass commands to NWNX. Take, for example, GetLocalVariableCount:
int GetLocalVariableCount (object oObject) {
DeleteLocalString(oObject, "NWNX!FUNCS!GETLOCALVARIABLECOUNT");
DeleteLocalString(oObject, "NWNX!FUNCS!GETLOCALVARIABLEBYPOSITION");
int nVariables = NWNXFuncsZero(oObject, "NWNX!FUNCS!GETLOCALVARIABLECOUNT");
DeleteLocalString(oObject, "NWNX!FUNCS!GETLOCALVARIABLECOUNT");
return nVariables;
}
All it does in nwscript is set and delete variables (NWNXFuncsZero just sets a variable, too). You won't find the meat and potatoes in nwscript - it's handled by NWNX. The Get/Set strings are just 'bridge' functions, used to pass information.
Of course, for all this to work, you need to have started the mod using NWNX. You can't just drop functions into your scripts and expect them to work without NWNX running in the background. The old, dare I say 'normal' way of doing this is by means of the NWNX executable that runs the mod as a server, though virusman also made a new version aimed at single player use. Did you launch your mod with NWNX?
Funky
Modifié par FunkySwerve, 09 septembre 2011 - 03:29 .