Wikia

NWNWiki

Watchlist Recent changes

Portals

This article is about scripted transitions within a module; for scripted transitions to other servers, see Portal.

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.

Making a PortalEdit

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));
	}
}

NotesEdit

  • 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.

Pages on NWNWiki

Add a Page
3,365pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
1,978photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki