| 211 | | Have a look at "myTestLevel.oxw" and "SpaceBoundaries.h", to see how space boundaries hork in detail. |
| | 211 | Have a look at "myTestLevel.oxw" and "SpaceBoundaries.h", to see how space boundaries work in detail. |
| | 212 | |
| | 213 | == Portals == |
| | 214 | Portals allow to teleport through space. |
| | 215 | First you need to place at least two PortalEndPoint. Give each end point a unique id using e.g. id=1. Then you need the PortalLink class to define which PortalEndPoint is connected to which other PortalEndPoint. |
| | 216 | The attribute target of a PortalEndPoint may be used to restrict the classes that can use the PortalEndPoint. By default all Pawn instances can use it. By typeing target="MobileEntity" all MobileEntity instances can use the PortalEndPoint. |
| | 217 | The templates in the example below only hve the purpose to make the end points visible. Use the design attribute of a PortalEndPoint to automatically apply the specified template to it. |
| | 218 | {{{ |
| | 219 | #!xml |
| | 220 | <Template name=PortalDefault> |
| | 221 | <PortalEndPoint> |
| | 222 | <attached> |
| | 223 | <Billboard material="Portals/Default" /> |
| | 224 | </attached> |
| | 225 | </PortalEndPoint> |
| | 226 | </Template> |
| | 227 | |
| | 228 | <Template name=PortalBig> |
| | 229 | <PortalEndPoint> |
| | 230 | <attached> |
| | 231 | <Billboard material="Portals/Big" /> |
| | 232 | </attached> |
| | 233 | </PortalEndPoint> |
| | 234 | </Template> |
| | 235 | |
| | 236 | <PortalEndPoint position="0,0,0" id="1" distance="40" target="Pawn" design="PortalDefault"/> |
| | 237 | <PortalEndPoint position="-100,0,0" id="2" distance="40" target="MobileEntity" design="PortalBig"/> |
| | 238 | <PortalLink fromID="1" toID="2" /> |
| | 239 | <PortalLink fromID="2" toID="1" /> |
| | 240 | }}} |
| | 241 | |
| | 242 | Have a look at "Portals.dox", "portals.oxw", "PortalLink.h" and "PortalEndPoint.h", to see how portals work in detail. |