Various pc starting positions
From NWNWiki
[edit] Various PC starting Positions
Place your script in the Starting areas OnEnter node. You will need to decide how you want to filter the PCs: by race, level, alignment, class, random, or any cobination thereof. Place a Waypoint where you want the Filtered PCs to go to, and yes, these can be in different areas.
For example, to have all evil PCs to start in "Hades" and all Good PCs to start in "Heven," place a Waypoint in Hades and tag it something like "HADE_START", and place a Waypoint in Heven and tag it "HEVEN_START". I would place the following script in the OnEnter of the start area.
void main()
{
object oPC = GetEnteringObject();
object oHades = GetObjectByTag("HADE_START");
object oHeven = GetObjectByTag("HEVEN_START");
if(!GetIsPC(oPC))return;
if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL)
{
DelayCommand(1.0,AssignCommand(oPC,JumpToObject(oHades)));
return;
}
else if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD)
{
DelayCommand(1.0,AssignCommand(oPC,JumpToObject(oHeven)));
return;
}
//Neutral, stay here.
}
The 1 sec delay is to ensure the PC is fully loaded in before it jumps them. This helps stop "hick-ups"
[edit] Why not place the script in the OnClientEnter?
The OnClientEnter triggers before the PC is loaded into the Starting area. So the script will jump the PC to the waypoint first. Then the game will jump them back to the starting area. i.e, it will work backwords.
