Difference between revisions of "User:Dora Gustafson"

From Second Life Wiki
Jump to navigation Jump to search
 
(31 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{LSL Header}}
{{LSL Header}}
==The Talking Die script==
<div id="box">
Place this script in a cube and you have a Die.<br>
== About ==
The Die will say how many pips are on the upward face, after the Die is tossed.
I have been a premium since spring 2007.<br>
<lsl>
Over the time I made quite a few scripts.<br>
/////
The scripts are the basis for my business.<br>
//  The talking Die script, studio Dora, Dora Gustafson 2008
Many are published in the SL forums and some are given away.<br>
//  v1.20 Basics
Here are some working scripts that highlights LSL functions and SL characteristics
/////
</div>
//  Place this script in a cube and you have a Die.
<div id="box">
//  The Die will say how many pips are up after it is tossed.
//  Free ware! feel free to utilize this script
//    and texture, partially or as a whole
//  Please give credit to the creator: Dora Gustafson
//  You can do that by keeping this header unchanged
/////


list pr;
== Highlighted scripts ==
string dieTexture = "b88d3ced-e298-83d7-7da6-e130a337b6ac"; // terning 2x6 SD.png
#[[User:Dora_Gustafson/talking_die|Talking Die]]
 
#[[User:Dora_Gustafson/llAxes2Rot_right_and_wrong|llAxes2Rot]] Right and Wrong
string pips_up()
#[[User:Dora_Gustafson/point_tracker|Key framed Motion forward on a closed track]]
{
#[[User:Dora_Gustafson/Basic_Resizer|Re-size or re-scale objects with a single small script]]
    vector u = llRot2Fwd( llGetRot() );
#[[User:Dora_Gustafson/sundirection_and_time_of_day|Show Sun Direction and compare to Time of Day]]
    vector v = llRot2Left( llGetRot() );
#[[User:Dora_Gustafson/universal_hinged_motion|Universal hinged motion]] in 8 Key Frames
    vector w = llRot2Up( llGetRot() );
#[[User:Dora_Gustafson/Pendulum_motion|Pendulum motion]] Simple Pendulum Motion in 24 Key Frames, a good swing motion
 
#[[User:Dora_Gustafson/Harmonic_Oscillator_motion|Harmonic Oscillator motion]] Motion in 12 Key Frames
    // Vectors associated with die pip numbers
#[[User:Dora_Gustafson/captureCameraView|Capture Camera View]] Using llSetLinkCamera()
    list pips_list = [ u.z, 1, -u.z, 6, v.z, 2, -v.z, 5, w.z, 3, -w.z, 4 ];
#[[User:Dora_Gustafson/llRotBetween_alternatives#llRotBetween.2C_some_alternatives_and_considerations|llRotBetween]] alternatives and considerations
    // sort for the one with the biggest Z (vertical up) component,
#[[User:Dora_Gustafson/fixed_3D_relation|Fixed 3D Relation]] Position and Rotation computations
    // the associated pip number is upward
#[[User:Dora_Gustafson/JSON_structure_facial_expression|JSON structured menu]] for all facial expressions
    return llList2String( llListSort( pips_list, 2, FALSE ), 1 );
#[[User:Dora_Gustafson/insertion_sort|Straight insertion Sort script]]
}
#[[User:Dora_Gustafson/occurences|Count occurencces in a list]]
 
#[[User:Dora_Gustafson/bezier_toy|Bézier Toy]]
default
#[[LlTargetOmega_Replacement|Replacing llTargetOmega]] with a Key Framed Motion
{
#[[User:Dora_Gustafson/moderated_world_wind|Moderated in-world wind]]
    state_entry()
#[[User:Dora_Gustafson/wind_motor_core|Wind motor Core]]
    {
        llSetPrimitiveParams([
        PRIM_TEXTURE, 0, dieTexture, < 0.5, 0.333, 0.0>, < 0.75, -0.333, 0.0>, 0.0,
        PRIM_TEXTURE, 1, dieTexture, < 0.5, 0.333, 0.0>, < -0.75, 0.0, 0.0>, 0.0,
        PRIM_TEXTURE, 2, dieTexture, < 0.5, 0.333, 0.0>, < 0.75, 0.333, 0.0>, 0.0,
        PRIM_TEXTURE, 3, dieTexture, < 0.5, 0.333, 0.0>, < 0.75, 0.0, 0.0>, 0.0,
        PRIM_TEXTURE, 4, dieTexture, < 0.5, 0.333, 0.0>, < -0.75, 0.333, 0.0>, 0.0,
        PRIM_TEXTURE, 5, dieTexture, < 0.5, 0.333, 0.0>, < -0.75, -0.333, 0.0>, 0.0 ]);
        llSetStatus( STATUS_PHYSICS, TRUE );
        llSetBuoyancy( 0.5 );
    }
 
    collision_start(integer n)
    {
        llSetTimerEvent( 2.0 );
        pr = llGetPrimitiveParams([PRIM_POSITION, PRIM_ROTATION ]);
    }
 
    land_collision_start(vector v)
    {
        llSetTimerEvent( 2.0 );
        pr = llGetPrimitiveParams([PRIM_POSITION, PRIM_ROTATION ]);
    }
 
    timer()
    {
        list prnu = llGetPrimitiveParams([PRIM_POSITION, PRIM_ROTATION ]);
        if ( pr == prnu )
        {
            llSetTimerEvent( 0.0 );
            llWhisper( PUBLIC_CHANNEL, pips_up() + " pips" );
        }
        else pr = prnu;
    }
}</lsl>
{{LSLC|Library}}

Latest revision as of 11:46, 10 December 2016

About

I have been a premium since spring 2007.
Over the time I made quite a few scripts.
The scripts are the basis for my business.
Many are published in the SL forums and some are given away.
Here are some working scripts that highlights LSL functions and SL characteristics

Highlighted scripts

  1. Talking Die
  2. llAxes2Rot Right and Wrong
  3. Key framed Motion forward on a closed track
  4. Re-size or re-scale objects with a single small script
  5. Show Sun Direction and compare to Time of Day
  6. Universal hinged motion in 8 Key Frames
  7. Pendulum motion Simple Pendulum Motion in 24 Key Frames, a good swing motion
  8. Harmonic Oscillator motion Motion in 12 Key Frames
  9. Capture Camera View Using llSetLinkCamera()
  10. llRotBetween alternatives and considerations
  11. Fixed 3D Relation Position and Rotation computations
  12. JSON structured menu for all facial expressions
  13. Straight insertion Sort script
  14. Count occurencces in a list
  15. Bézier Toy
  16. Replacing llTargetOmega with a Key Framed Motion
  17. Moderated in-world wind
  18. Wind motor Core