FANDOM


 
(format, wikify, rearranged some info, minor edits)
Line 1: Line 1:
[[category:Script_directory:Doors and Levers]]
+
A '''portal''' is nothing more than a [[script|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 [[PC]]s to port to. Give the waypoint a unique [[tag]].
   
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.
+
==Making a Portal==
+
Place the following script in the OnUsed script handle of the portal. For this example I’ll call it WP_ARRIVE.
Place the following script in the OnUsed script handle of the portal.
 
   
 
<pre>
 
<pre>
Line 19: Line 19:
 
</pre>
 
</pre>
   
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.
+
==Notes==
  +
*If the waypoint is in the same [[area]], [[associate]]s 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.
  +
  +
[[category:Script_directory:Doors and Levers]]

Revision as of 17:07, June 23, 2007

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

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.
Community content is available under CC-BY-SA unless otherwise noted.