I used this code, but it didn't work for me either..
#include "nwnx_funcs"
void main()
{
object oPC = GetLastUsedBy();
FloatingTextStringOnCreature(IntToString(NWNXFuncs_GetSoundSetID(oPC)), oPC, TRUE);
NWNXFuncs_SetSoundSetID(oPC, 241);
}
It shows My Voice Set was 0...
It did however change my voiceset, lol althought it wasn't 241...
Don't know why it's not working correctly...
Also I don't understand why it sets & deletes the integer in the custom functions in the same function, that in itself seems like bad scripting..
void NWNXFuncs_SetSoundSetID(object oCreature, int iSoundSetID) {
SetLocalString(oCreature, "NWNX!FUNCS!SETSOUNDSETID", IntToString(iSoundSetID));
DeleteLocalString(oCreature, "NWNX!FUNCS!SETSOUNDSETID");
}
This is what the Log File read...
Windows NWNX Funcs plugin v.0.0.8.4 [log level: 3]
[09/16/2011 15:37:42] * CreateLookupTable
[09/16/2011 15:37:42] * CreateNewGeometry hooked
[09/16/2011 15:37:42] * CustomEffect function hooked
[09/16/2011 15:37:42] * CNWVirtualMachineCommands__ExecuteCommandGetItemPropertyType hooked
[09/16/2011 15:37:42] * CNWVirtualMachineCommands__ExecuteCommandItemPropertyEffect hooked
[09/16/2011 15:37:42] * CNWSMessage__TestObjectVisible hooked
[09/16/2011 15:37:42] * CNWSCreatureStats__GetEffectImmunity hooked
[09/16/2011 15:37:42] * CServerExoAppInternal__RemovePCFromWorld hooked; script to run: onplayerleaving.nss
[09/16/2011 15:38:20] - StrReq: "GETSOUNDSETID" Params: "-"
[09/16/2011 15:38:20] - StrReq: "SETSOUNDSETID" Params: "189"
[09/16/2011 15:38:25] o CServerExoAppInternal__RemovePCFromWorldHOOK running
[09/16/2011 15:39:30] - StrReq: "GETSOUNDSETID" Params: "-"
[09/16/2011 15:39:30] - StrReq: "SETSOUNDSETID" Params: "189"
[09/16/2011 15:39:47] o CServerExoAppInternal__RemovePCFromWorldHOOK running
So it should be working (Technically), but it's not working correctly, unfortunately, though it will change the sound set one time...(to the same soundset, but the wrong one)
Modifié par _Guile, 16 septembre 2011 - 08:42 .