-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c472908
commit 91a6880
Showing
6 changed files
with
458 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
string open = "682c41fb-bfa4-9e2e-baf4-50ce596a75cf"; /// UUID for Open Sign | ||
string closed = "9747d088-6fce-28da-1d7e-f6078191b64a"; ///UUID for Closed sign | ||
integer back = 3; | ||
integer front = 2; | ||
|
||
|
||
default | ||
{ | ||
state_entry() | ||
{ | ||
llSetTimerEvent(15); ///updates every 15 seconds | ||
} | ||
|
||
timer() | ||
{ | ||
list parcel = llGetAgentList(AGENT_LIST_PARCEL,[]); | ||
key owner = llGetOwner(); | ||
if(llListFindList(parcel, [owner]) != -1){ ///owner on parcel | ||
llSetTexture(open, front); | ||
llSetTexture(closed, back); | ||
} | ||
else { ///owner off parcel | ||
llSetTexture(closed, front); | ||
llSetTexture(open, back); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Automatic-Open-Close-Sign-SL | ||
This script will change a sign to open when the owner of the object is on the parcel, and closed when the owner is not. Connected to the UUID of example images. | ||
I'm open to people using this script on other objects and or with other textures. | ||
This is available on the Second Life Marketplace on a mesh with simple textures [here](https://marketplace.secondlife.com/p/Automatic-Immersive-Open-Closed-Sign/22943124). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
key particle = "20bf0490-490d-0286-5b0d-1e9fb6d6eb64"; //heart particle effects, replace with different UUID for different effect | ||
key sound = "5bf74a5d-26a2-a8f2-059b-926247edb26f"; //dog pant sound, replace with different UUID for different sound | ||
string doggo = "Stella"; //change for different dog name | ||
string bodyOne = "head"; //change for different body part, e.g. belly | ||
//string bodyTwo = "belly"; //change for different body part, e.g. belly //not implemented | ||
/* Do not change anything below this unless you know what you're doing! | ||
Seriously!*/ | ||
key self; | ||
key toucher; | ||
//integer touchedPrim; //not implemented | ||
integer pets = 0; //for counter | ||
integer waiter = 0; | ||
integer active = FALSE; | ||
integer spam = FALSE; | ||
integer status = FALSE; | ||
WhisperAlias(string alias, string message) { //this function is so the object can whisper under an alias | ||
string orignialName = llGetObjectName(); //save orignal name in a variable | ||
llSetObjectName(alias); //set object name to alias | ||
llWhisper(0,message); // whisper the message input | ||
llSetObjectName(orignialName); //set object name back to original name | ||
} SetStatus() { //set the hover text | ||
string text; | ||
if (toucher == self) { //if touching self | ||
text = "Silly "+(string)doggo+", you can't pet yourself."; | ||
} else if (spam == TRUE) { //if spamming | ||
text = "Let's give "+(string)doggo+" a break."; | ||
} else if (active == TRUE) { //if not spamming and active | ||
text = "Thank you for petting "+(string)doggo+"!"; | ||
} else { //if not spamming and not active | ||
text = "Pet "+(string)doggo+"'s "+(string)bodyOne+"!\n"; // default text | ||
if(pets>0) text += (string)doggo+"'s "+(string)bodyOne+" has been pet "+(string)pets+" times."; //if any pets, add this counter | ||
} llSetText(text,<1.0, 1.0, 1.0>,.9); | ||
status = TRUE; | ||
} FadeStatus() { | ||
llSetText("",<1.0, 1.0, 1.0>,.9); //fade the text | ||
status = FALSE; | ||
} SpamPrevention(){ | ||
// llWhisper(0, "SpamPrevention() running\nActive: "+(string)active+" Spam: "+(string)spam); //debug message | ||
spam = TRUE; | ||
active = TRUE; | ||
SetStatus(); //set hover text to spam message | ||
if (toucher != self) WhisperAlias(doggo,"You're petting too quickly, please calm down."); //if toucher isn't self, whisper anti spam message | ||
if (toucher == self) WhisperAlias(doggo,"Stop trying to pet yourself, silly "+(string)doggo+"."); //if toucher is self, whisper differnt message | ||
//llWhisper(0,"Sleeping for five seconds in SpamPrevention."); //debug message | ||
llSleep(5.0); //wait five seconds. **Cannot recieve further touch!** | ||
// llWhisper(0,"Awake in SpamPrevention"); //debug message | ||
spam = FALSE; | ||
waiter = 0; | ||
llSetTimerEvent(3.0); | ||
} SelfTouch(){ // response to owner's attempt to touch patter. | ||
if (active == TRUE) { //if considered active, run spam prevention | ||
SpamPrevention(); | ||
} else { //if not active, set hover text to self touch dialogue | ||
active = TRUE; //set to active for spam prevention | ||
// llWhisper(0, "SelfTouch() running\nActive: "+(string)active+" Spam: "+(string)spam); //debug message | ||
SetStatus(); //set hover text | ||
waiter = 0; | ||
llSetTimerEvent(3.0); //run timer() every three seconds | ||
} | ||
} PlaySound() { | ||
llTriggerSound(sound,0.3); // sound at 30% volume | ||
} Response() { //do the things test | ||
active = TRUE; //set to active for spam prevention | ||
SetStatus(); //set hover text | ||
++pets; //increase pets counter by one | ||
llRequestPermissions(llDetectedOwner(0), PERMISSION_TRIGGER_ANIMATION); //load anim. permissions from object owner | ||
if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) { // if permissions granted, play animations | ||
llStartAnimation("Tail_Wag_High"); | ||
llStartAnimation("TonguePanting"); | ||
llStartAnimation("Jaw3"); | ||
} PlaySound(); | ||
llParticleSystem( [ //emit particles. This long block is just particle properties. | ||
PSYS_PART_FLAGS, 0 | ||
| PSYS_PART_WIND_MASK | ||
| PSYS_PART_EMISSIVE_MASK | ||
| PSYS_PART_FOLLOW_SRC_MASK | ||
| PSYS_PART_INTERP_COLOR_MASK, | ||
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE, | ||
PSYS_PART_START_COLOR, <1.0, 1.0, 1.0>, | ||
PSYS_PART_START_SCALE, <0.3, 0.3, 0.3>, | ||
PSYS_PART_START_ALPHA, 1.0, //start completely opaque | ||
PSYS_PART_END_ALPHA, 0.01, //end nearly transparent | ||
PSYS_SRC_BURST_RATE,6.0, | ||
PSYS_SRC_BURST_PART_COUNT,10, //spawn ten hearts | ||
PSYS_PART_END_COLOR, <1.0, 1.0, 1.0>, | ||
PSYS_PART_MAX_AGE, 5.0, //last 5 seconds | ||
PSYS_PART_START_GLOW, 0.01, //start lightly glowing | ||
PSYS_PART_END_GLOW, 0.0, //end with no glow | ||
PSYS_SRC_TEXTURE, particle | ||
] ); | ||
waiter = 0; | ||
llSetTimerEvent(3.0); //run timer() every 3 seconds | ||
} StopEverything() { //remove toucher data, stop particle effects, stop animations. | ||
toucher = NULL_KEY; //remove toucher info. Cannot set this to 0 due to type error | ||
llParticleSystem([]); | ||
if (pets>0) { //if more than zero pets, stop animations. when this isn't in there, it give an error bc it tries to stop animations that don't have permissions yet | ||
llStopAnimation("Tail_Wag_High"); | ||
llStopAnimation("TonguePanting"); | ||
llStopAnimation("Jaw3"); | ||
} active = FALSE; | ||
} default { | ||
state_entry() { //when the script starts, grab owner UUID, set the particle system up, and begin timer() | ||
llParticleSystem([]); | ||
llSetTimerEvent(3.0); //this is just to fade the starting hover text | ||
self = llGetOwner(); //grab the UUID of object owner | ||
} touch_start(integer toucherQuant) { //upon touch, grab the amount of people touching, usually one | ||
// llWhisper(0, "touch_start\nActive: "+(string)active+" Spam: "+(string)spam); //debug message | ||
if(toucherQuant == 1) { // if only one person is touching, grab their UUID | ||
toucher = llDetectedKey(0); | ||
//llWhisper(0, (string)toucher+" is touching "+(string)self); //debug message | ||
if(toucher != self) { //if the toucher isn't the owner | ||
string toucherName = llGetDisplayName(llDetectedKey(0)); //grab the name of whoever touched the patter | ||
if(active == FALSE) { // if Response() is not going and someone other than the owner touches it, run Response() | ||
WhisperAlias(doggo,(string)toucherName+" pets "+(string)doggo+" the dog's "+(string)bodyOne+"."); | ||
Response(); //do sound and particles | ||
} else if (active == TRUE) { //if Response() is running and someone touches it, begin spam prevention | ||
SpamPrevention(); | ||
} | ||
} else { //if the owner has touched while Response was not running, run SelfTouch() | ||
SelfTouch(); | ||
} | ||
} else { // if there are multiple touchers, begin spam prevention | ||
SpamPrevention(); | ||
} | ||
} timer() { //stop everything, reset the hover text, and intiate a counter | ||
StopEverything(); | ||
SetStatus(); | ||
++waiter; | ||
// llWhisper(0,(string)waiter+" in timer."); //debug message | ||
if (status == TRUE && waiter > 4) { // if there's hover text (which there should be) and the counter is over four, fade the hover text and end the timer | ||
FadeStatus(); | ||
llSetTimerEvent(0.0); //end the timer | ||
} | ||
} changed(integer change) { //if the owner of the object changes, reset the script | ||
WhisperAlias("Headpatter", "Object owner has changed."); //debug message | ||
if(change & CHANGED_OWNER) llResetScript(); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# HellhundHeadpatter | ||
## Current Features | ||
- Plays sound, particle effects, and animations specific to the Hellhund when touched. | ||
- Unclear how animations will affect other avatars. | ||
- End user customization such as adding their own texture for the particle effect, adding their own sounds, customizing the dog name, and customizing the dog part petted such as the head or the belly. | ||
- Sets hover text to a number of dyanmic messages. | ||
- Counts and displays the number of pets recieved. | ||
- Whispers under alias so that all whisper messages are under the dog's name. | ||
- Fades hover text after adjustable time as to not annoy others. | ||
- Prevents spamming by owner or others. | ||
- Resets script upon owner change. | ||
## Planned Features | ||
- Linked prim set up where each prim corresponds to a body part with a single script. | ||
- Current system: Put script into each prim. | ||
- More animations, perhaps randomized. | ||
- More sounds, perhaps randomized. | ||
- Animate the toucher with petting animation? | ||
- Must verify that the toucher is biped. | ||
- Might need to move toucher | ||
- RLV? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Super Simple Needs HUD Second Life | ||
This script creates a very simple way to roleplay natural needs in Second Life. | ||
|
||
**Update October 2022** - Overhauling the Super Simple Needs HUD from the ground up. Seeking collaboration on HUD design and features. |
Oops, something went wrong.