A Set of 3 Primitives (Sphere, Cylinder, Plane) at different size
What these do.
- Fully support transparency via Alpha Channel From Targa
- Texture Mapping and SphereMap reflection
- Can be positionned at any height, even bellow the playfield
- Can be rotated on any axis (x-y-z)
- Can be moved on any axis (x-y-z)
- Can be used wisely to build complicated object that are interactive!
- Animatable with Scripting. modifiable Speed. see the Toy reference in the FP manual.
Note** they work ONLY with the version 1.9.20081225 of Future Pinball. Chris was to remove this feature in the next version
so if you use these objects, you might want to put that little note in the infos or your table, so people know what build they need to make them work properly.
Note2** Not every feature from the manual are Active. those I can assure that work are listed bellow
---------------------------------------------------------------------------------------------------------------------------
FROM THE MANUAL
Table Object: Toy
The Toy object allows for custom 3D models to be controlled via the script and made to animate, move and rotate. This object is very advanced and requires a minor understanding of 3D movement/rotation principles. Toy objects are generally 'one off' special objects on pinball tables which are specific to that game and are used to add a bit of uniqueness to the table. Toy models can only be crafted by the Future Pinball development team
EDITOR PROPERTY (DESIGN TIME)
When you create a Toy on your table, the object will be drawn onto the current workspace.
Selecting this object will bring up the following property sheet:
Name
Sets the name of the object which is used to reference the object via Script events. The name must be unique for the table and may not contain any spaces. As with all Object Names, you should give a descriptive name to your object.
Model
This field shows the list of available models which have been loaded into your table. Future Pinball contains a large collection of models in the libraries supplied. You can import more models into your table by using the Model Manager. Only models which have the same object type of the current object are listed. Selecting a model will also show a small preview picture of the selected Model.
Texture
Allows you to wrap a texture around the object. Textures are imported into the Table via the Texture Manager. Selecting a Texture will also show a small preview picture of the texture.
Colour
Defines the colour of the Object. If the object is to be rendered with a texture then the texture will be tinted with this colour. If the object has no texture then it will be rendered in this colour. It is best never to use Full Strength colours (i.e., where either the Red, Green or Blue components are at their Limits) as this will adversely affect how the object is Shaded by the Lighting system. For more information on the use of Colour refer to the Special Graphic Processing chapter
Sphere Mapping
If Enabled (Ticked ), then any texture is Sphere Mapped onto the object. For more information on Sphere Mapping refer to the Special Graphic Processing chapter
Transparency
The Transparency slider allows you to make the Toy transparent (to simulate translucent plastics). With the slider all the way over to the right (max), then the ramp is fully opaque. Moving the slider to the left will make the object more transparent. When a object is transparent any objects which are behind it (or below it) will also show through. Objects which are transparent (or semi-transparent) are drawn in a second rendering phase of the game engine. This is so it can draw objects underneath them as well as tint them to the colour of the surface.
There is a special case to the Transparency slider. If it is all the way to the left (at its minimum value) then the object will be drawn in the second rendering pass but the object will NOT be transparent. This is so you can render textures on the surface which either have a colour marked as being transparent (in the case of BMP textures via the Texture Manager or you are using a TGA file with an alpha channel.
SCRIPTING
This Section describes the object and how it can be accessed and controlled via the script at run-time. Note that you access the object via the name given in the Name property field
<Integer> .UpdateInterval = { Period in Milliseconds }
This property allows you to change the animation speed of the object when it is Animating (changing key frames in the 3d model. The smaller the value the faster the animation will run. The value must be at least 25 milliseconds.
Script Example: myToy.UpdateInterval = 100
<floating point> .Tx = { Position }
This property allows you to get or set the X coordinate of the object on the playfield. If you set this value then this will stop any current MoveTo() action currently being performed. Future Pinball does not limit the value of this property so you must be careful not to set it to a position outside of the playfield.
This diagram will help explain the different axis's in 3D. +Z is towards the front of the playfield (-Z is towards the backbox). +Y is above the playfeild. 0, 0, 0 is the exact center of the playfield and on its surface so the majority of object will have a +Y position.
Script Example: myToy.Tx = 100
<floating point> .Ty = { Position }
This property allows you to get or set the Y coordinate of the object on the playfield. If you set this value then this will stop any current MoveTo() action currently being performed. Future Pinball does not limit the value of this property so you must be careful not to set it to a position outside of the playfield.
For more information refer to the .Tx property.
<floating point> .Tz = { Position }
This property allows you to get or set the Z coordinate of the object on the playfield. If you set this value then this will stop any current MoveTo() action currently being performed. Future Pinball does not limit the value of this property so you must be careful not to set it to a position outside of the playfield.
For more information refer to the .Tx property.
<floating point> .AngleXZ = { Angle in Degrees }
This property allows you get or specify the rotation angle of the object on the XZ axis. If you set this value then this will stop any current RotateXZ() command which may be currently being processed. Values will be between 0.00 and 359.99 degrees.
This diagram will help explain the different rotation axis's and how the effect the Toy object.
Script Example:
' set the angle to 22.0 degrees
myToy.AngleXZ = 22.0
<floating point> .AngleXY = { Angle in Degrees }
This property allows you get or specify the rotation angle of the object on the XY axis. If you set this value then this will stop any current RotateXY() command which may be currently being processed. Values will be between 0.00 and 359.99 degrees. For more information refer to the .AngleXY property.
<floating point> .AngleYZ ={ Angle in Degrees }
This property allows you get or specify the rotation angle of the object on the YZ axis. If you set this value then this will stop any current RotateXZ() command which may be currently being processed. Values will be between 0.00 and 359.99 degrees. For more information refer to the .AngleXY property.
.MovelTo ( <floaing point> X, <floaing point> Y, <floaing point> Z, <floaing point> Speed )
This method also allows you to move the Toy object to any location in the Future Pinball 3D world. Future Pinball does not limit the values of this method so you must be careful not to move it to a position outside of the playfield (unless ofcourse you want to).
X The X coordinate to move the object to.
Y The Y coordinate to move the object to.
Z The Z coordinate to move the object to.
Speed The Speed at which the object will move. Future Pinball uses logarithms to control the speed of the object so the object will ramp up to speed which reflects the time it takes for a pinball motor to wind up to full speed. The speed must be positive. Specifying a negative speed will have no affect.
For more information on 3d coordinates refer to the .Tx property.
Script Example:
' lower the object into the playfield (draw bridge in bk2k)
myToy.MoveTo myToy.Tx, myToy.Ty-42, myToy.Tz
.RotateXZ ( <floaing point> Speed, <Integer> StopAtAngle )
This method also allows you to rotate the object on the XZ axis at the specified speed. The rotation will stop when the XZ angle reaches the StopAtAngle (if specified) else the object will continue to rotate forever.
Speed The speed of the Rotation. If Positive then the object will move clockwise else if negative the rotation will be counter-clockwise.
StopAtAngle (optional) If specified then the object will stop rotating on this axis when it reaches the speficied angle. Valid ranges are between 0 and 369 degrees.
For more information on 3d rotation axis's refer to the .AngleXZ property.
Script Example:
' spin clockwise (forever)
myToy.RotateXZ 50
Rotate anti-clockwise until we reach the stop angle of 90 degrees;
myToy.RotateXZ -50, 90
.RotateXY ( <floaing point> Speed, <Integer> StopAtAngle )
This method also allows you to rotate the object on the XY axis at the specified speed. The rotation will stop when the XY angle reaches the StopAtAngle (if specified) else the object will continue to rotate forever.
Speed The speed of the Rotation. If Positive then the object will move clockwise else if negative the rotation will be counter-clockwise.
StopAtAngle (optional) If specified then the object will stop rotating on this axis when it reaches the speficied angle. Valid ranges are between 0 and 369 degrees.
For more information on 3d rotation axis's refer to the .AngleXZ property.
.RotateYZ ( <floaing point> Speed, <Integer> StopAtAngle )
This method also allows you to rotate the object on the YZ axis at the specified speed. The rotation will stop when the YZ angle reaches the StopAtAngle (if specified) else the object will continue to rotate forever.
Speed The speed of the Rotation. If Positive then the object will move clockwise else if negative the rotation will be counter-clockwise.
StopAtAngle (optional) If specified then the object will stop rotating on this axis when it reaches the speficied angle. Valid ranges are between 0 and 369 degrees.
For more information on 3d rotation axis's refer to the .AngleXZ property.
--------------------------------------------------------------------------------------------------------------------------------------------------
Steve
Edited by Steve Paradis, 30 December 2009 - 10:58 PM.





Top

Contributor














are all trademarks of VPFORUMS.