HowToAddMapsServerStendhal: Difference between revisions
Content deleted Content added
imported>Chad3f |
imported>Chad3f |
||
Line 83:
* House Door portals.
A portal is just the generic portal. It works for almost everything you can imagine.
Portals are created by adding a entries to your zone in '''zones.xml'''. For example creating a portal to an internal building entrance might look like:
A one way portal is a portal that only exists as endpoint, so none can use the portal to move back to the origin. For example you have such a portal at Semos to reenter game after dying.▼
<pre>
<zone name="int_myarea_mylocation" file="int_myarea_mylocation.xstend">
<portal x="10" y="15" ref="entrance">
<destination zone="0_myarea_city" ref="mylocation_entrance"/>
</portal
</zone>
<zone name="0_myarea_city" file="0_myarea_city.xstend">
<portal x="10" y="15" ref="mylocation_entrance">
<destination zone="int_myarea_location" ref="entrance"/>
</portal
</zone>
</pre>
The '''ref''' attribute of a portal should be a name unique to the zone it is in (and meaningful). This value has a corresponding reference via the '''<destination>''' ref name. You are responsible for correctly assigning the ref names of each portal.
▲A one way portal is a portal that only exists as endpoint, so none can use the portal to move back to the origin. For
<pre>
<portal x="11" y="44" ref="my_exit">
<implementation class-name="games.stendhal.server.entity.portal.OneWayPortalDestination"/>
</portal>
</pre>
The House door portal is a special type of portal that automatically creates all the portals and areas needed to add a house to that zone with its entrance on point where the portal is.
Finally the stairs portals also automate the creation of stairs between two areas. It is very important that the portals ( both ends ) are exactly on the same position but on different levels. Position means absolute position. Also, due to current implementation, be careful '''not''' to place omni-directional stair portals at the same exact location between adjacent levels if they're not meant to be linked, as they might inadvertantly be linked. Directional stairs are safer and only link with the level they go toward.
== Adding NPC ==
| |||