FANDOM



Portals are 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 your PCs to port to. Give the Waypoint a Unique tag. For this example I’ll call it WP_ARRIVE.

Place the following script in the OnUsed script handle of the portal.

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

Note: If the Waypoint is in the same area, Henchmen, Familiars, and pets will have a hard time finding their master. That 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.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.