Portals
From NWNWiki
A portal is nothing more than a scripted transition. To make it work you need a portal object and a waypoint. Make the object “usable†and place the waypoint in the location you want the PCs to port to. Give the waypoint a unique tag.
[edit] Making a Portal
Place the following script in the OnUsed script handle of the portal. For this example I’ll call it WP_ARRIVE.
///////////////////////////////////////////////////
// Port PC
///////////////////////////////////////////////////
void main()
{
object oPC = GetLastUsedBy(); // Get the user of the object
object oDest = GetObjectByTag("WP_ARRIVE"); // way point tag.
if(GetIsPC(oPC))
{
AssignCommand(oPC,JumpToObject(oDest));
}
}
[edit] Notes
- If the waypoint is in the same area, associates will have a hard time finding their leader. Correcting this potential problem would require additional scripting.
- If the waypoint is in a different area, then there should be no problem with followers. They should make the jump by default.
