User:Allen Kerensky/Myriad Lite/BAM Trap

= BAM Trap =

BAM Trap Concepts
This Myriad Compatible Trap script, when used in a prim, causes Myriad damage and does other things, if avatar touches or collides with it.

It is normally used by the Game Master builder to add the element of risk to players walking or flying around in a sim RP game environment.

BAM Trap Setup

 * 1) Choose a location for the trap to exist within your sim/region game environment.
 * 2) Edit a prim to the size and area desired for your trap.
 * 3) In the prim contents, add a sound file you desire to be played when the trap interacts with a player.
 * 4) In the prim contents, add the script: Myriad Compatible Trap.
 * 5) Edit the script in the prim:
 * 6) Do not change the Myriad interaction settings unless you really know what you are doing.
 * 7) Change the SOUNDNAME: (default = "zap") to the exact name of the sound you added. Alternatively, you may rename the sound to "zap".
 * 8) Change the TRAPNAME: (default = "BIG TRAP") to your desired name for your new trap.
 * 9) Change the MYRIADTRAPNAME: (default = "TRAP1") to your desired Myriad RP Event name for your new trap
 * 10) Change the COLLISIONMESSAGE (default = "tried to trap you! ") message directly sent to the avatar at the time of interaction with the trap.
 * 11) Change the MYRIADMESSAGE (default = "tried to trap ") message sent via Myriad RP Event
 * 12) Change the HOVERTEXT: (default "TRAP") to your desired warning floating text above your new trap. (no text = " ")
 * 13) Change the HTEXTALPHA alpha of hovertext: (default = 0.5)  (opaque = 1.0) (transparent = 0.0)
 * 14) Change the PUSHPOWER vector direction/power  (default = <200,200,200>) to push the avi away at the time of interaction with the trap.  (Requires push-enabled region and parcel)
 * 15) Place the trap in the position desired for interaction with avatars.
 * 16) For full interaction with the trap, the avatar must wear a Myriad compatible HUD and Meter.

Note! The trap will not damage its owner, so please test the trap using an alt avatar, or a volunteer.

BAM Trap Tips

 * 1) To turn any existing object into a trap: Make the trap prim a cylinder or sphere, place it at the same position as the existing object, but make the trap prim slightly larger diameter. Then make the trap prim 100% transparent.
 * 2) The push power should be just enough push in a good direction to cause the avatar to be pushed away when they walk or fly into it. However, it can also orbit the avatar if too much Z axis power is set.

The Myriad RPG Group
Join the Myriad RPG group for announcements and discussion around the Myriad RPG and Myriad Lite scripts.

SecondLife: secondlife:///app/group/dbedc3be-729e-a123-d669-92f401e07a1e/about

OSgrid: secondlife:///app/group/da0227e5-8a0d-4d99-b970-9411932c852d/about

Feature Requests
If you have a feature you would like to see added to Myriad Compatible Trap, write a new feature request on the talk page for this article.

The best feature requests will have: Your SL name The name, version, and date of the script you are requesting new features in A description of the feature A sample implementation of the feature in LSL compatible with OSG and SL.

Bug Reports
If you find a bug or something that just doesn't seem right in how the Myriad Compatible Trap script works, file a bug report on the talk page for this article.

The best bug reports will have: Your OSG or SL name The name, version, and date of the script you are having problems with A description of the problem itself Steps to follow to reproduce the problem

Contributing to Myriad Lite
If you would like to contribute to the Myriad Lite project, please do!

The best contributions will have: Your SL Name A description of the contribution The patch, script, file, or object being contributed A release stating: * that you intend to contribute this to Myriad Lite * that you are the original creator of the contribution or are legally empowered to contribute it * that you acknowledge this contribution can be released under the Creative Commons BY 3.0 Unported and Modified BSD (3-clause) licenses

//============================================================================ // BAM Trap // Copyright (c) 2012 by Lani Global Systems and Allen Kerensky (OSG/SL) All Rights Reserved. // This work is dual-licensed under // Creative Commons Attribution (CC BY) 3.0 Unported // http://creativecommons.org/licenses/by/3.0/ // - or - // Modified BSD License (3-clause) // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // * Redistributions of source code must retain the above copyright notice, //  this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, //  this list of conditions and the following disclaimer in the documentation //  and/or other materials provided with the distribution. // * Neither the name of Myriad Lite nor the names of its contributors may be //  used to endorse or promote products derived from this software without //  specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN // NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // The Myriad RPG System was designed, written, and illustrated by Ashok Desai // Myriad RPG System licensed under: // Creative Commons Attribution (CC BY) 2.0 UK: England and Wales // http://creativecommons.org/licenses/by/2.0/uk/ //============================================================================