Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

changing sculpt textures

Poppytat Sodwind
Registered User
Join date: 29 Nov 2006
Posts: 52
12-11-2009 04:22
hi,
i was wondering if anyone knows of a script which will change the sculpt texture continually/randomly...i know it is possible to change a texture continually...like in a freebie dancefloor i have.
what i am wanting to do is have maybe 3 or 4 sculpt textures set to one prim so that it looks like the prim is 'moving slightly'
i hope this is making some sense...

can anyone help please.
Poppytat Sodwind
Registered User
Join date: 29 Nov 2006
Posts: 52
12-11-2009 04:29
kinda like this one, but instead of it being 'external' and changing the picture of the prim, i want it to change the shape of the prim >

integer number;
integer count;
default
{
state_entry()
{
number = llGetInventoryNumber(INVENTORY_TEXTURE);
count = 0;
llSetTimerEvent(1.0);
}
timer()
{
count++;
string name = llGetInventoryName(INVENTORY_TEXTURE, count);
if (name != "";)
llSetTexture(name, ALL_SIDES);
if (count >= number)
count = 0;

}
}
Pete Olihenge
Registered User
Join date: 9 Nov 2009
Posts: 315
12-11-2009 04:50
You will want to look at the function llSetPrimitiveParams, the PRIM_TYPE flag and the PRIM_TYPE_SCULPT flag and its parameters here: http://wiki.secondlife.com/wiki/LlSetPrimitiveParams
Poppytat Sodwind
Registered User
Join date: 29 Nov 2006
Posts: 52
12-11-2009 05:39
yup, i have been looking at this all morning...but i am no scripter...its all foreign to me...
Poppytat Sodwind
Registered User
Join date: 29 Nov 2006
Posts: 52
12-11-2009 05:44
ok...i have no clue what i am supposed to be looking at, sorry...
just a 'simple' sculpt texture change script is what i am needing, similar to the texture change script...but not changed on touch...

i dont have time to go to SL school to learn scripting from scratch, so far i have managed quite well with my things... :D

is there anyone who cares to make me this script...payment if it works...
:)

i guess i am lazy....
Pete Olihenge
Registered User
Join date: 9 Nov 2009
Posts: 315
12-11-2009 05:48
Try replacing

llSetTexture(name, ALL_SIDES);

with

llSetPrimitiveParams ([PRIM_TYPE, PRIM_TYPE_SCULPT, name, PRIM_SCULPT_TYPE_SPHERE]);

and make the timer event something like 10 seconds to give things time to happen.

ETA:

CODE

integer number;
integer count;

default
{
state_entry()
{
number = llGetInventoryNumber(INVENTORY_TEXTURE);
count = 0;

llSetTimerEvent(10.0);
}
timer()
{
count++;
string name = llGetInventoryName(INVENTORY_TEXTURE, count);
if (name != "")
//llSetTexture(name, ALL_SIDES);
llSetPrimitiveParams ([PRIM_TYPE, PRIM_TYPE_SCULPT, name, PRIM_SCULPT_TYPE_SPHERE]);
if (count >= number)
count = 0;
}
}


Free of charge :)
Paladin Pinion
The other one of 10
Join date: 3 Aug 2007
Posts: 191
12-11-2009 10:47
Just a little tweak to make sure that inventory item 0 gets included:

CODE

integer number;
integer count;

default
{
state_entry()
{
number = llGetInventoryNumber(INVENTORY_TEXTURE);
count = 0;

llSetTimerEvent(10.0);
}
timer()
{
string name = llGetInventoryName(INVENTORY_TEXTURE, count);
if (name != "")
llSetPrimitiveParams ([PRIM_TYPE, PRIM_TYPE_SCULPT, name, PRIM_SCULPT_TYPE_SPHERE]);
count++;
if (count >= number)
count = 0;
}
}
_____________________
Mote Particle Script Generator - easier and faster than any HUD
Also: Paladin's Sunbeam. Up at dawn, gone by dusk, day and night sounds, fully configurable
See more at: www.paladinpinion.com