zzzz

Join us in Phaze Demesnes or follow us:

Home   Show All
Category: Contributor: Creator
Avatar Twitch_Tail_script  

Twitch_Tail_script

Twitch_Tail_script

Category: Avatar
By : Ferd Frederix
Created: 2013-03-03 Edited: 2013-03-03
Worlds: Second Life + OpenSim

the Zip file

Download all files for Twitch_Tail_script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Twitch_Tail_script_1.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 // twitchy tail script by Ferd Frederix
2 // Open Source provided this header is intact and credit is given.
3
4 float on = 0.0;
5 float off = 1.0;
6 list params_Up ;
7 list params_Left ;
8 list params_Right ;
9 list params_Stiff;
10
11 float ona = 0.0;
12 float offa = 1.0;
13
14 integer softness = 1;
15 float gravity = 0.4;
16 float friction =3.0;
17 float wind = 0.0;
18 float tension = 1.5;
19 vector force =<0,0,0>;
20 vector forceL =<1,0,0>;
21 vector forceR =<-1,0,0>;
22 default
23 {
25 {
26 params_Up = [ PRIM_FLEXIBLE, TRUE, softness, -1, friction, wind, tension, force];
27 params_Left = [ PRIM_FLEXIBLE, TRUE, softness, -gravity, friction, wind, tension, forceL];
28 params_Right = [ PRIM_FLEXIBLE, TRUE, softness, -gravity, friction, wind, tension, forceR];
29 params_Stiff = [ PRIM_FLEXIBLE, FALSE, softness, -gravity*4, friction, wind, tension, force];
30 llSetPrimitiveParams(params_Up);
32 }
33
34
35 touch_start(integer total_number)
36 {
37 llSay(0, "Don't touch that!");
38 }
39
40 timer()
41 {
42 float num = llFrand(4);
43
44 if (num < 0.25)
45 {
46 llSetPrimitiveParams(params_Stiff);
47 }
48 else if (num < 2)
49 {
50 llSetPrimitiveParams(params_Up);
51 }
52 else if (num < 3)
53 {
54 llSetPrimitiveParams(params_Right);
55 }
56 else {
57 llSetPrimitiveParams(params_Left);
58 }
59
60 llSetTimerEvent(llFrand(1) + 1);
61 }
62
63 on_rez(integer param)
64 {
66 }
67 }