Okay so I'm working on my OnDeath script and I can't get the PC to go to the death plane. Seem like everything else is firing properly just can't get him to move areas.
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.com/View.php?view=Ot ... 683&id=625 */
//Goes OnPlayerDeath of the module properties
void main()
{
object oPC = GetLastPlayerDied();
if (!GetIsPC(oPC)) return;
object oTarget;
oTarget = GetObjectByTag("PClootbag");
object oItem;
oItem = GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oItem))
{
AssignCommand(oTarget, ActionTakeItem(oItem, oPC));
oItem = GetNextItemInInventory(oPC);
}
int nInt;
for (nInt=0; nInt <num_inventory_slots; nint++)<br="">{
oItem = GetItemInSlot(nInt, oPC);
if (GetIsObjectValid(oItem))
AssignCommand(oTarget, ActionTakeItem(oItem, oPC));
}
AssignCommand(oTarget, TakeGoldFromCreature(GetGold(oPC), oPC));
location lTarget;
oTarget = GetWaypointByTag("toDeathplane");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
SetLocalLocation(oPC, "ls_stored_loc", GetLocation(oPC));
AssignCommand(oPC, ClearAllActions());
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
oTarget = oPC;
//Visual effects can't be applied to waypoints, so if it is a WP
//the VFX will be applied to the WP's location instead
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
}</num_inventory_slots;>
Not sure what the issue is, no errors in the script.