Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Scripting problems

Kume Grant
Registered User
Join date: 30 Aug 2005
Posts: 7
11-16-2006 01:02
I'm having a problem with two scripts.
ONe is a script that will make wings appear or dissapre if you are flying or not. (seriously not even wiki is helping)
and the second is a script that makes a phantom prim turn a specific color if someone passes through it and makes it non phantom after 2 seconds.. can anyone help?
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
11-16-2006 01:30
There are a number of approaches to the wings.

You can take control (llTakeControls) and calculate if the wearer is flying that way and cause the wings to appear. You can use llGetAgentInfo on a timer to detect if the agent info is flying. You can get llGetAnimation on a timer to see if the current base animation is flying or flying slow.

Personally, I think llTakeControls is the most elegant solution, it doesn't require timers, and you can have several scripted objects with controls without problem, I have a horrid feeling when I log in I'll be wearing four different items that take controls, not including wings!

The neat solution to the second part is llVolumeDetect. Turning this on will set the object into a pseudo phantom, but still enable collisions to be detected. Detect your appropriate collision, use llSetColor, then after a suitable period set llVolumeDetect to FALSE and voila no phantom behaviour. You might want to combine that with a state change so the collisions stop firing or not depending on your application.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Kume Grant
Registered User
Join date: 30 Aug 2005
Posts: 7
Thanks. ^_^
11-16-2006 01:46
Wow thanks a lot. ^_^
Kume Grant
Registered User
Join date: 30 Aug 2005
Posts: 7
some specifics
11-17-2006 00:21
all right here's what I need now. I need to make it so that when the person PASSES THROUGH the object it'll change color. this doens't work too well for me because of the phantom prim limitations. Any help in this area?
Kume Grant
Registered User
Join date: 30 Aug 2005
Posts: 7
New plan
11-17-2006 02:00
all right now that i got help i need the following.

1) I need a solid prim to say something upon collision but only once per impact not repeated for the length of contact...

2) after a prim that has turned from phantom to solid I want that prim to do as (1) does but will only do so until the script is reset.

How would I go about doing this?
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
11-17-2006 07:11
collision_start rather than collision?
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Mr Blackthorne
Registered User
Join date: 26 Oct 2006
Posts: 13
Invisible while flying script in the library
11-17-2006 10:41
A "turn invisible/visible while Im flying" script can be found in the Script Library forum here - /15/89/26143/1.html