Difference between revisions of "SubWorlds"

(Use)
(Use)
Line 39: Line 39:
 
All that does it set the type to "subworld", if you don't want a visual SubWorld you can add:
 
All that does it set the type to "subworld", if you don't want a visual SubWorld you can add:
  
 +
<object>:
 
     visual:
 
     visual:
 
         render: false
 
         render: false
Line 47: Line 48:
 
For anything you're going to collide against in the non-SubWorld you have as a collider... right?  For everything you're going collide with in the SubWorld you need a collider with this AlcScript:
 
For anything you're going to collide against in the non-SubWorld you have as a collider... right?  For everything you're going collide with in the SubWorld you need a collider with this AlcScript:
  
<objectName>:
+
<object>:
 
     physical:
 
     physical:
 
         subworld: <subworld-object name>
 
         subworld: <subworld-object name>

Revision as of 17:15, 4 June 2008

Note: This tutorial has been made in preparation for an upcoming release of PyPrp, it will only work with the newest (unreleased version). This is currently unsupported (we won't help you with something if you get stuck).


SubWorlds

About

SubWorlds are objects that make your avatar stand still relative to them. They are used to simulate normal inertia(the transferal of motion to another object) in Uru. A prime example is the Er'Cana harvester.


Use

To use SubWorlds in PyPrp you need a few things; a entrance-region, a exit region, the SubWorld its self and (if you don't want to fall though the floor) some objects that you can interact with while you are in the SubWorld eg. elevator floor.

The entrance-region should be placed where you want to enter the SubWorld, say the inside-threshold of the elevator and should carry this AlcScript:

<object>:
    type: region
    regiontype: subworld
    region:
        subworld: <subworld-object name>

The exit-region should be on the outer-threshhold of your elevator (if you have an elevator) and should have the AlcScript:

<object>:
    type: region
    regiontype: subworld
    physical:
        subworld: <subworld-object name>

The SubWorld should be an empty representing the coordinate system of the subworld, and it's script should look like this:

<object>:
    type: subworld

All that does it set the type to "subworld", if you don't want a visual SubWorld you can add:

<object>:
    visual:
        render: false


Here's the most important part; The SubWorld colliders:

For anything you're going to collide against in the non-SubWorld you have as a collider... right? For everything you're going collide with in the SubWorld you need a collider with this AlcScript:

<object>:
   physical:
       subworld: <subworld-object name>

This is why the exit-region needed to have the physical.subworld code attached, it's because regions are a kind of collider, and if you can't collide, you can't trigger it. You should also set this for all regions that are expected to be triggered while you are in the SubWorld eg. elevator click-regions.


That just about wraps up everything you need to know. :)