Difference between revisions of "Lever Library"

From Second Life Wiki
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Description ==
= Description =
[[User:Haravikk Mistral|Haravikk Mistral]]'s Lever Library is a collection of scripts intended to provide scripters with a series of easy-to-use and flexible scripts for handling various standard types of controls such as buttons, levers, and more! All of these scripts are free to use and may be modified as you please, provided you credit the author in some form.
[[User:Haravikk Mistral|Haravikk Mistral]]'s Lever Library is a collection of scripts intended to provide scripters with a series of easy-to-use and flexible scripts for handling various standard types of controls such as buttons, levers, and more! All of these scripts are free to use and may be modified as you please, provided you credit the author in some form.


== Scripts ==
= Levers =
=== Pivot Levers ===
== Pivot Levers ==
A pivot lever describes a handle of some kind which rotates around a pivot point, and may be set into two or more positions along the circumference defined by this relationship. This could be as simple as a switch where the lever is rotated from on to off or it could be a multiple location lever which can be moved to any of a series of "notches" which may perform differing tasks.
A pivot lever describes a handle of some kind which rotates around a pivot point, and may be set into two or more positions along the circumference defined by this relationship. This could be as simple as a switch where the lever is rotated from on to off or it could be a multiple location lever which can be moved to any of a series of "notches" which may perform differing tasks.


Everyday pivot levers can be found in the form of a hand-brake in a car, or a twist handle in a door (where you push down or turn the handle to open).
Everyday pivot levers can be found in the form of a hand-brake in a car, or a twist handle in a door (where you push down or turn the handle to open).


==== Alternate Uses ====
=== Alternate Uses ===
Pivot lever scripts can also be used to implement other items, such as rotating dials that can only be moved through a series of set positions. Everyday examples of this include the dials/knobs on many kitchen ovens, or the scroll-wheel on a mouse.
Pivot lever scripts can also be used to implement other items, such as rotating dials that can only be moved through a series of set positions. Everyday examples of this include the dials/knobs on many kitchen ovens, or the scroll-wheel on a mouse.


==== Scripts ====
=== Scripts ===
[[Touch Pivot Lever]]
* [[Touch Pivot Lever]]
* [[Grab Pivot Lever]]
 
== Slide Levers ==
A slide lever is one that moves along a fixed line of positions between two points. Everyday slide levers can be found in mixing desks, or on sliding bolt-locks and similar applications. NOTE: You should not use sliding lever scripts to try to implement user-interface sliders, you are better-off using [[llDetectedTouchPos|llDetectedTouchPos()]] and a suitable texture on your HUD prim, rather than moving the actual prims around as these scripts do.
 
=== Scripts ===
* [[Touch Slide Lever]]
* [[Grab Slide Lever]]
 
== Rotating Levers ==
These are levers that are not easily found in real-world applications, and are not the same as a pivot lever, though in many ways they behave similarly. For these you should picture a surface with a circle shaped slot cut out of it. Within this circle is an upright lever, capable of being rotated around the circumference of the circle. These types of levers do not generally occur in everyday use, though you may find these scripts are better for implementing some types of levers that do not behave quite as you want as a pivot lever.
 
=== Scripts ===
'''COMING SOON'''
 
== Path Levers ==
Another interesting lever type. These can be moved through a series of points along a slotted path.
For example, imagine a surface with a "T" shape cut into it, a lever is situated in the lower part of the T, and can be moved up and left, or up and right to sit into the upper parts of the "T". In essence, these scripts allow you to define a path along which a lever may move, by defining a series of points that it may move through.
 
Some such movements could of course be incredibly complicated, but can be used to implement all kinds of interesting devices.
 
=== Scripts ===
'''COMING SOON'''
 
= Buttons =
== Push-button ==
A simple push-button. These are found in many common applications in everyday use, but chances are all you need to do is look at a single key on your computer keyboard to understand what a push-button is. It can simple be pushed in or down, either releasing immediately afterward (returning to the out or up position) or must be pressed again to release it.
 
=== Scripts ===
'''COMING SOON'''
 
== Multi-push button ==
An array of push-buttons which can either have any number of buttons enabled at once, or only a single button enabled at once.
 
=== Scripts ===
'''COMING SOON'''
 
== Sequence buttons ==
A set of buttons which must be pressed in a particular order in order to 'release'. This is a fun way to implement coded doors or puzzles, but are generally not visible in everyday applications.
 
=== Scripts ===
'''COMING SOON'''

Latest revision as of 14:11, 21 January 2009

Description

Haravikk Mistral's Lever Library is a collection of scripts intended to provide scripters with a series of easy-to-use and flexible scripts for handling various standard types of controls such as buttons, levers, and more! All of these scripts are free to use and may be modified as you please, provided you credit the author in some form.

Levers

Pivot Levers

A pivot lever describes a handle of some kind which rotates around a pivot point, and may be set into two or more positions along the circumference defined by this relationship. This could be as simple as a switch where the lever is rotated from on to off or it could be a multiple location lever which can be moved to any of a series of "notches" which may perform differing tasks.

Everyday pivot levers can be found in the form of a hand-brake in a car, or a twist handle in a door (where you push down or turn the handle to open).

Alternate Uses

Pivot lever scripts can also be used to implement other items, such as rotating dials that can only be moved through a series of set positions. Everyday examples of this include the dials/knobs on many kitchen ovens, or the scroll-wheel on a mouse.

Scripts

Slide Levers

A slide lever is one that moves along a fixed line of positions between two points. Everyday slide levers can be found in mixing desks, or on sliding bolt-locks and similar applications. NOTE: You should not use sliding lever scripts to try to implement user-interface sliders, you are better-off using llDetectedTouchPos() and a suitable texture on your HUD prim, rather than moving the actual prims around as these scripts do.

Scripts

Rotating Levers

These are levers that are not easily found in real-world applications, and are not the same as a pivot lever, though in many ways they behave similarly. For these you should picture a surface with a circle shaped slot cut out of it. Within this circle is an upright lever, capable of being rotated around the circumference of the circle. These types of levers do not generally occur in everyday use, though you may find these scripts are better for implementing some types of levers that do not behave quite as you want as a pivot lever.

Scripts

COMING SOON

Path Levers

Another interesting lever type. These can be moved through a series of points along a slotted path. For example, imagine a surface with a "T" shape cut into it, a lever is situated in the lower part of the T, and can be moved up and left, or up and right to sit into the upper parts of the "T". In essence, these scripts allow you to define a path along which a lever may move, by defining a series of points that it may move through.

Some such movements could of course be incredibly complicated, but can be used to implement all kinds of interesting devices.

Scripts

COMING SOON

Buttons

Push-button

A simple push-button. These are found in many common applications in everyday use, but chances are all you need to do is look at a single key on your computer keyboard to understand what a push-button is. It can simple be pushed in or down, either releasing immediately afterward (returning to the out or up position) or must be pressed again to release it.

Scripts

COMING SOON

Multi-push button

An array of push-buttons which can either have any number of buttons enabled at once, or only a single button enabled at once.

Scripts

COMING SOON

Sequence buttons

A set of buttons which must be pressed in a particular order in order to 'release'. This is a fun way to implement coded doors or puzzles, but are generally not visible in everyday applications.

Scripts

COMING SOON