Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Visitor Detector

Smith Peel
Smif v2.0
Join date: 10 Jan 2005
Posts: 1,597
06-10-2006 00:25
Hello, I'm hoping a clever scriptor can help me with a script that would basically change the texture on a prim whenever someone steps onto a parcel of land. Kind of like a welcome sign. There may be a reward involved for a properly working script that I can use. :D
_____________________
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
06-10-2006 01:46
From: Smith Peel
Hello, I'm hoping a clever scriptor can help me with a script that would basically change the texture on a prim whenever someone steps onto a parcel of land. Kind of like a welcome sign. There may be a reward involved for a properly working script that I can use. :D

Spread a large prim over the floor of the teleport arrival point. Script something like this:

CODE

default
{
state_entry ()
{
llSetTexture ("Unstepped On Texture UUID", All_SIDES);
}
collision_start (integer c)
{
state Stepped_On;
}
}

state Stepped_On
{
state_entry ()
{
llSetTexture ("My stepped on Texture UUID", All_SIDES);
llSetTimerEvent (120.0);
}
timer ()
{
state default;
}
state_exit ()
{
llSetTimerEvent (0.0);
}
}

Caution: the above code is untested and may not work! Open source, do as you want with it.
Smith Peel
Smif v2.0
Join date: 10 Jan 2005
Posts: 1,597
06-10-2006 11:23
Thanks for helping me out. I get the error ";(4,71) : ERROR : Name not defined within scope"... Any thoughts?

Also, will this work in theory i have an invisible prim to step on and the actual sign is in the air?

Thanks!
_____________________
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
06-10-2006 16:17
I can sooooo see what the problem is.... that I am gigglin'
_____________________
http://slurl.com/secondlife/Together
Smith Peel
Smif v2.0
Join date: 10 Jan 2005
Posts: 1,597
06-10-2006 17:28
Care to elaborate? :rolleyes:
_____________________
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
06-10-2006 17:32
The l's aren't capitalized-- it should be ALL_SIDES, not All_SIDES.

Here's the fixed version.
CODE

default
{
state_entry ()
{
llSetTexture ("Unstepped On Texture UUID", ALL_SIDES);
}
collision_start (integer c)
{
state Stepped_On;
}
}

state Stepped_On
{
state_entry ()
{
llSetTexture ("My stepped on Texture UUID", ALL_SIDES);
llSetTimerEvent (120.0);
}
timer ()
{
state default;
}
state_exit ()
{
llSetTimerEvent (0.0);
}
}
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
06-10-2006 18:20
Thanks for fixing that, Keknehv! :)
Smith Peel
Smif v2.0
Join date: 10 Jan 2005
Posts: 1,597
06-10-2006 18:21
With a little tinkering, this worked surprisingly well for my purposes. A huge thanks and $500L to Angela, as well as a big thanks to Kek & $300L for clarifying. (Escort, at least you got a good giggle :rolleyes: )


Thank you very much!! :D
-Smith
_____________________
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
06-10-2006 18:51
Wow, that was the easiest L$300 I ever made :D