Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Try before you buy scripts

Foster Virgo
Registered User
Join date: 16 Jun 2004
Posts: 175
08-18-2004 16:11
Hi, I have seen only a few examples of this, one was the really great Chip Midnight example where you can try on the body tat skins with a click of a button as a demo. Another was just to test a vehicle out.

Is this simple enough to be a free open source script, the skins example places a folder into your inventory I noticed and lets you try on stuff, but is there a temporary method like time restricted to say like 5 minutes way to do something like this?

This would be a great asset for all objects being sold, like weapons, attachments, skins...

Anyway what exactly is available out there now for this type of vendor system and how much does it cost if it does cost to implement?
Klintel Kiesler
Registered User
Join date: 31 Dec 2003
Posts: 51
08-18-2004 16:40
In the case of Chip Midnight's 'demo' skins, you pay for the object and receive the inventory item, you aren't able to limit a time on this, no scripts can be used on textures/skins.

However, for objects you can make a script with a timer in it that can send the script into a non-functioning state.

As for weapons you can have a bullet count after that number of bullets has been fired send the script into another state.

Heres an example of how a timer event can send the script for a 'demo' object into a state that doesn't allow it to function any more.

CODE

default
{
state_entry()
{
llSetTimerEvent(60);
}
timer()
{
state end;
}
}

state end
{
state_entry()
{
llSay(0,"this concludes the demo.");
}
}

Foster Virgo
Registered User
Join date: 16 Jun 2004
Posts: 175
08-18-2004 18:50
Ok that might make sense to someone who knows lsl but for those of us that can't seem to get a grip on it can you comment the lines?

like between the () is that where item names go or?

state entry () is that huh?

I got a script for you and it might seem like the same thing here look.

//Slider Prodcedure:

proc cwSlider (string $label, int $min, int $max, string $attr, string $name, int $reset)

{

floatSliderButtonGrp -l $label -f true -s 1 -min $min -max $max

-cal 1 left -cw5 65 40 160 50 35

-bl "Reset" -bc ("setAttr " + $attr + " " + $reset + "";)

-sbc ("setKeyframe " + $attr)-sbd true -i "SETKEYSMALL.xpm"

$name;

connectControl $name ($attr);

}

//second panel

global proc cwPanelContents2()

{

scrollLayout;

string $form = `formLayout`;

string $tabs = `tabLayout -innerMarginWidth 5 -innerMarginHeight 5`;

formLayout -edit

-w 450

-attachForm $tabs "top" 0

-attachForm $tabs "left" 0

-attachForm $tabs "bottom" 0

-attachForm $tabs "right" 0

$form;



//THIS creates contents for first tab Back

string $tabContent1 = `columnLayout`;

cwSlider "BackBend" -10 10 UpperBody.BackBend SL2 0;

cwSlider "BackBow" -20 20 UpperBody.BackBow SL3 0;

cwSlider "BreathSize" .1 10 UpperBody.breathSize SL4 2;

setParent $tabs;



//THIS creates contents for second tab Head

string $tabContent2 = `columnLayout`;

cwSlider "JawOpen" .5 10 Head.JawOpen SL5 0;

cwSlider "JawJut" -1 5 Head.JawJut SL6 0;

cwSlider "JawGrind" -4 4 Head.JawGrind SL7 0;

cwSlider "EyeJitter" -10 10 EyesLook.eyeJitter SL20 0;

cwSlider "EyeSidetoSide" -2.2 2.2 EyesLook.tx SL21 0;

cwSlider "EyesUpDown" -2.5 2.5 EyesLook.ty SL22 0;

setParent..;





//THIS creates contents for third tab Arms

string $tabContent3 = `columnLayout`;

cwSlider "RtArmTurn" -5 10 RtArm.wristTurn SL9 0;

cwSlider "RtHandSpread" -10 10 RtArm.FingerSpread SL10 0;

cwSlider "LtArmTurn" -5 10 LtArm.wristTurn SL11 0;

cwSlider "LtHandSpread" -10 10 LtArm.FingerSpread SL12 0;

cwSlider "Handswitch" -10 10 UpperBody.HandSwitch SL25 0;

setParent..;



//THIS creates contents for fourth tab Legs

string $tabContent4 = `columnLayout`;

cwSlider "Crouch" -6 1 UpperBody.ty SL1 0;

cwSlider "RtLegLift" -1 6 RtLeg.ty SL16 0;

cwSlider "LTLegLift" -1 6 LtLeg.ty SL17 0;

cwSlider "RtFootRoll" -10 10 RtLeg.roll SL18 0;

cwSlider "LtFootRoll" -10 10 LtLeg.roll SL19 0;

setParent..;

for some reason I can learn this MEL script language easily but the lsl language is so counter intuitive I can't even get a foothold.