Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

texture changer script

warboss Smashcan
Registered User
Join date: 10 Oct 2006
Posts: 5
04-04-2007 10:27
hi, ive been searching everywhere for a script that would let me change an object from one texture to another on command. for example, if i said a certian word it would become a certain texture the object holds, whilst when i say another the object would change to that texture, much like colour changer on command scripts

any help appreciated
warboss
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
04-04-2007 11:36
What you're lookin' for is a 'picture viewer' or 'picture frame' script, and there are TONS of these available in-world and throughout SLEx and SLB.

If you are looking to build your own, it's a relatively simple process:

1--Have the script count the number of textures in inventory (llGetInventoryNumber(INVENTORY_TEXTURE);)

2--Add a listen to the script

3--On command, have a counter shift one way or the other

4--If counter <0, restart at top of counter, if counter >;(Inventorynumber - 1), restart at 0.

5--Apply the counted texture to the desired side: llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, x), ALL_SIDES);

Anyway...something like that is a very basic, very simple outline of how to make one. Obviously, there are a lot of things you can do to enhance functionality / usability.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
04-04-2007 12:30
We covered the same thing here
warboss Smashcan
Registered User
Join date: 10 Oct 2006
Posts: 5
04-04-2007 14:28
thx guys, help well and truely appretiated, now i can get on with my building :D