Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Avatar Halfatar  

Halfatar

For a half-avatar such as my Zombie and skeleton.

Category: Avatar
By : Ferd Frederix
Created: 2013-10-04 Edited: 2013-10-04
Worlds: Second Life

the Zip file

Download all files for Halfatar
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. eye ctrl.lsl
Get file # 2. eyes.lsl
Get file # 3. OS controller.lsl
Get file # 4. SL controller.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 // script to play an animation while walking or running only.
2 // requires animation named "stranglehold"
3 // Use in half-avatars
4 // :Author: Ferd Frederix
5
6
7
8 string LastAnimName;
9 string newAnimationState;
10 string LastRunState; //SL or Opensim Animate State
11 key Owner;
12
13 StartAnimation()
14 {
15 if(LastRunState != newAnimationState)
16 {
17 if(newAnimationState == "Walking" || newAnimationState == "Running" || newAnimationState == "Turning Left" || newAnimationState == "Turning Right")
18 {
19 //llOwnerSay("changed");
20 llStopAnimation(LastAnimName);
21 LastRunState = newAnimationState;
22
23 LastAnimName = ("stranglehold");
24
25 llStartAnimation("stranglehold");
26
28
29 } else {
30 if(LastAnimName == "stranglehold"){
31 llStopAnimation(LastAnimName);
32 }
33 LastRunState = newAnimationState;
34 }
35
36 }
37 }
38
39
40 Initialize(key id)
41 {
42 if(id == NULL_KEY) // detaching
43 {
44 llStopAnimation(LastAnimName);
45 }
46 else // attached, or reset while worn
47 {
49 Owner = id;
50
51 }
52 }
53
54 default
55 {
57 {
58 // script was reset while already attached
59 if(llGetAttached() != 0) {
60 Initialize(llGetOwner());
61 }
62 }
63
64 attach(key id) {
65 Initialize(id);
66 }
67
68
70 {
72 llOwnerSay("Zombie-ride active");
73 }
74 }
75
76
77 changed(integer change) // Reset on region restart
78 {
79
80 if(change & CHANGED_ANIMATION)
81 {
82 newAnimationState = llGetAnimation(Owner);
83
84 // llOwnerSay((string) newAnimationState);
85 StartAnimation();
86 }
87 }
88
89
90 }

Halfatar

Makes the eyes wiggle randomly

Category: Avatar
By : Ferd Frederix
Created: 2013-10-04 Edited: 2013-10-04
Worlds: Second Life


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 // script to control the eyes randomly
2 // requires the texture be in the eye
3 // Use in half-atars
4 // :Author: Ferd Frederix
5
6
7 default
8 {
10 {
11 llSetTimerEvent(1.0);
12 }
13 timer()
14 {
17 }
18 }

Halfatar

Individual eye script for random wiggles

Category: Avatar
By : Ferd Frederix
Created: 2013-10-04 Edited: 2013-10-04
Worlds: Second Life


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 // script to control each eye
2 // Use in half-avatars
3 // :Author: Ferd Frederix
4
5
6
7 default
8 {
9 link_message( integer sender_num, integer num, string str, key id )
10 {
11 float x = (float) str;
12 float y = x;
13 if(llFrand(2) < 1)
14 y = -x;
15 llSetPrimitiveParams([PRIM_TEXTURE,ALL_SIDES,"bloodshot eye",<2,3,0>,<x,y,0>,0.0]);
16 }
17 }

Halfatar

Main Controller for animations - makes the rider grip the zombie or skeleton when moving

Category: Avatar
By : Ferd Frederix
Created: 2013-10-04 Edited: 2013-10-04
Worlds: Second Life


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 // script to play an animation while walking or running only.
2 // requires animation named "stranglehold"
3 // Use in half-avatars
4 // :Author: Ferd Frederix
5
6
7 string LastAnimName;
8 string newAnimationState;
9 string LastRunState; //SL or Opensim Animate State
10 key Owner;
11
12 StartAnimation()
13 {
14 if(LastRunState != newAnimationState)
15 {
16 if(newAnimationState == "Walking" || newAnimationState == "Running" )
17 {
18 // llOwnerSay("changed");
19
20 LastRunState = newAnimationState;
21
22 LastAnimName = ("stranglehold");
23
24 llStartAnimation("Walk: Power");
25 llStartAnimation("stranglehold");
26
27
28 } else {
29
30 // llOwnerSay("delta");
31 if(LastAnimName == "stranglehold"){
32 // llOwnerSay("stop hold");
33 llStopAnimation("stranglehold");
34 llStopAnimation("Walk: Power");
35 }
36 LastRunState = newAnimationState;
37 }
38
39 }
40 }
41
42
43 Initialize(key id)
44 {
45 LastAnimName = "stranglehold";
46 if(id == NULL_KEY) // detaching
47 {
48 llStopAnimation(LastAnimName);
49 }
50 else // attached, or reset while worn
51 {
53 Owner = id;
54
55 }
56 }
57
58
59
60 default
61 {
63 {
64 // script was reset while already attached
65 if(llGetAttached() != 0) {
66 Initialize(llGetOwner());
67 }
68
69 }
70
71 attach(key id) {
72 Initialize(id);
73
74 }
75
76
78 {
80 llOwnerSay("Zombie-ride active");
81 llSetTimerEvent(0.5);
82 }
83 }
84
85 timer()
86 {
87 newAnimationState = llGetAnimation(Owner);
88 StartAnimation();
89 }
90
91
92
93
94
95
96 }

Back to the Best Free Tools in Second Life and OpenSim.