LeSeul Ferdinand
Don't read this, Too late
Join date: 7 Oct 2004
Posts: 78
|
11-05-2004 09:00
I'm very new to scripting, just feeling around really, I was wondering if it was possible to do two things...
1. To manipulate the tranparency of a single prim via a touch script, or chat command (I know this one is possible .... cuddle balls).
2. To manipulate the texture of a single prim from one named texture to another via a chat command or keyword (e.g. typing picture1 would result in the prim changing textures from a default to new picture for a set time, then reverting back, and so on for more pictures).
Any help with this would be very much appreciated.
|
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
|
11-05-2004 10:13
Well, it's definitely do-able. In the first instance, you'd want to use either llSetAlpha() or llSetLinkAlpha(). In the second instance, you'd want to use llSetTexture() since we don't have llSetLinkTexture() just yet.  Or you could use llSetPrimitiveParams(), for either case. It's terribly versatile.  The following code would cause the containing prim to turn invisible when touched, then become visible once more when touched a second time. 
integer istransparent = FALSE ;
default { touch_start( integer num ) { if( istransparent ) { istransparent = FALSE ; llSetAlpha( 1.0 ) ; }
else { istransparent = TRUE ; llSetAlpha( 0.0 ) ; } }
state_entry() { } }
_____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
|
Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
|
11-05-2004 12:13
If you are going to sell these, remember to make the prim that uses the actual llSetPrimitiveParams(), modify enabled, or only you (the original owner) can make that work. I have to go make some mods to a bunch of things I've sold in the past now! *sigh*
Luckily I have downloaded all my accounts records so I know who to go back and talk to.
(woof... so much work to do!)
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts
|