Difference between revisions of "SubWorlds"
(→Use) |
(→Use) |
||
Line 48: | Line 48: | ||
<object>: | <object>: | ||
type: subworld | type: subworld | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Here's the most important part; The SubWorld colliders: | Here's the most important part; The SubWorld colliders: |
Revision as of 17:23, 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>
Alternatively, your exit region can encompass the walkable area of the subworld, and have a slightly different script:
<object>: type: region regiontype: subworld region: onexit: 1 physical: subworld: <subworld-object name>
The onexit parameter indicates that the region should be triggered when the avatar leaves it. This way, whenever you step off your subworld platform, you will be returned to the normal world.
The SubWorld should be an empty representing the coordinate system of the subworld, and it's script should look like this:
<object>: type: subworld
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. :)