AgeSwim

From Alcugs

Jump to: navigation, search

Note: Anything extracted from any Plasma Resource Files is property of Cyan Worlds, Inc. You may not use these assets without recieving written permission from Cyan Worlds, Inc.

Please read this Notice from Cyan about Age Creation before continuing.

Previous: Ladders Contents Next: Sounds

Contents

Swimming

For swimming we have 3 flavours:

  1. Normal Swimming Surface
  2. Straight Current Surface
  3. Circular Current Surface

As you will read in this tutorial, you can also use Circular current surfaces to emulate straight current surfaces. This can be easier to get right than StraightCurrentSurfaces

Adding a basic swim surface and region

The steps to add a working swimming surface (Basic) are the following:

Adding a swimming surface

  1. Use Scripts->Add >PyPRP->Add SwimSurface (in the Scripts Window)
  2. You'll notice a new plane in layer 2 - this is your swimming surface.
  3. (change the "Name" to something useful)
  4. Resize and modify the plane to the shape of the area you want to swim in.

Adding a swimming detector region To correctly start swimming, the plasma engine must know that you are within an area that alllows for swimming. This is called a Swim Detector Region. To add it, do the following:

  1. Use Scripts->Add->PyPRP->Add SwimRegion (in the Scripts Window)
  2. You'll notice a new region in layer 2 - this is your swim detector region
  3. (change the "Name" to something useful)
  4. Resize the region, to encompass all swimming surfaces, and have it extend quite a bit above nad below the surfaces.

Realistic swimming sounds

If you want realistic sounds, make two extra footstep sound regions

  1. Make a region with footstep sound type 12 (the sound of swimming), and have it encompass the area you'll be actually swimming in.
  2. Make another region with footstep sound type 02 (walking in water), and have it encompass the area of your water, in which you are walking, but not yet swimming.

Now, it will sound realistic, if you enter the water.

Swim Surfaces with current

Speed value indication:
Speed 2 can be easily overcome by swimming normally.
Speed 6 can only be overcome by swimming in "run" mode.

Both the Current surfaces have the need for a center point or Dummy Point object. This object tells the swimming surface something about the center of the object, and the direction of the current.

To add such a point object:

  1. Do [space bar]->Add->Empty in a 3d design window.
  2. Now you have a new point object. Position it slightly above your swimming surface.
  3. Change the name to something meaningful. NOTE: the point object name must be alphabetically less than the name of your swim surface. This ensures that the plugin exports your point before it exports your surface.
  4. Go to the object tab in a Buttons window, and make sure that the Axis property is enabled for this object. (So you can view the axes of the object.
  5. Select your swim surface, and go to the properties tab
  6. Add a new string property named "Centerpoint" and enter the name of your Dummy Point object here.

Now we will discuss the different swim regions

Straight Current Surfaces

To enable your swim surface as a straight current surface, change the prpregion property to "swimscursfc".

Now, add two Float properties:

  1. Float "Y-Speed"
  2. Float "Y+Speed"

To correctly set the direction of the current, you need to point the Y axis of your dummy object in the direction of your current. Should you point the Y axis not parallel to your swim surface, you might experience jumps up, or pulls down, every time you touch the swim surface. (So make sure your Dummy objects Y axis is parallel to the swim surface!)

The dummy object serves another purpose. It effectively divides the swimming surface in two areas:

  1. The area on the Negative side of the Dummy's Y axis (Where you are drifting towards the dummy object, but have not yet reached it)
  2. Another area on the Positive side of the Dummy's Y axis (Where your have drifted past the current dummy, and are drifting away form it.

For both areas you can set a different current speed. Property "Y-Speed" sets the speed of the current on the Negative side of the Dummy's Y axis Property "Y+Speed" sets the speed of the current on the Positive side of the Dummy's Y axis.

Property overview:

Float "Y-Speed" Defines speed of the current on the Y- side of the center point
Float "Y+Speed" Defines speed of the current on the Y+ side of the center point
String "Centerpoint" The name of the point object that is the swim surfaces center point or Dummy

Circular Current Surface

To enable your swim surface as a straight current surface, change the prpregion property to "swimccursfc".

Now, add two Float properties:

  1. Float "Rotation"
  2. Float "Attraction"

In the case of a Circular current surface, the Center point (Dummy) has a different (and more intuitive) usage. In this case, it effectively defines the center of your swimming surface. Rotation will be around the location of this center point, and the avatar will be attracted towards this center point. To set the speed of Rotation, put a float value in the "Rotation" property. A negative value, will make it rotate clockwise. To set the speed of attraction, put a float value in the "Attraction" property.

Property overview:

Float "Rotation" Defines speed of counterclockwise rotation around the center point
Float "Attraction" Defines speed of attraction towards the center point
String "Centerpoint" The name of the point object that is the swim surfaces center point or Dummy
Previous: Ladders Contents Next: Sounds
Personal tools