Resizer Script

Current Release 0.14
Aide en Français
These scripts will allow you to sell no modify items to your customers and still let them change the size of their product.
Key Features
  • Mono compiled
  • Easy Setup: Simply drag the setup script and read the instructions in world,
  • One script only needed: Be ready for the upcoming scripts limits,
  • Scale the resizer speed using several resizer working in parallel within the same object,
  • Menu Driven: Lets end user easily resize a no mod object,
  • Scale: +1% +5% +10% +20%, -1% -5% -10% -20%,
  • Spread the scale between several objects at same time, customer can disable the spread feature,
  • Freeze: Deletes all Resizer scripts installed into the object.
  • Pose: Stops all animations and starts you in a Editing Appearance state, Click this button to turn it off and on,
  • Custom animation can be used for Pose,
  • API to control Resizer from external scripts,
  • Free Update for Life.

Simple steps to setup your product

  1. Rez the object
  2. Drag the "=IOL Resizer Setup" into the root prim objet
  3. Wait for the script to propage into the entire set
  4. Once you get the message "Script loaded into child prims" Take object back into inventory and rez it again.
  5. Rez the object a second time
  6. Edit Object and select "Set Running into selection" into Second Life Tools menu
  7. Keep the script window open and wait until done.
  8. Drag the "=IOL Resizer:0" into each object

Tips

Speed the resizing


You can speed up the resizing process for the customer with adding multiple "=IOL Resizer" scripts. If you add "=IOL Resizer:1" script into the object, well the resizing process with be done in parallel by the two scripts ":0" an ":1" speeding up the resizing process around two. With three scripts speed will be three times more, 4 four, etc..

Spread scale: Synchronize the scale between different objects


Dragon Resizer script can be used to synchronize the scale of different objects at same time, for example you sell boots and wants your customer to resize right and left boot in same time. You can do this using the same description for both object before running the Dragon Resizer Setup.

Minimal and maximal size


When resizing the smallest dimension will remains 0.01 and the largest will be 10.0. Dragon Resizer will still remember the scale between original dimensions for any prims. Thus if the object is scale up or down again to normal size, proportion between prims will remains correct.

Customize the Pose animation for customer


Into the Options Menu of customer there is a Pose that will trigger Edit Appearance Animation, you can change the default animation putting an animation of your own into the object contents. It should be named ".resizer-pose".

Resizer API

IOL Resizer is shiped with an API thus one can control the script behaviour from external script.
All parameters are separated with ¤ character
LM_RZR_SETPARAMS <parameter-flags>
Set the resizer parameters. Actually there is only one parameters RZR_SHOWMENU.
To disable the resizer menu use llMessageLinked(LINK_SET, LM_RZR_SETPARAMS, "0", "");
LM_RZR_SCALE <propage> <scale>
Scale object to scale ratio.
If you use a multiple set object set propage to 1.
Scale 1.0 is original size.
LM_RZR_REMOVESCRIPT
Remove scripts from current object.
LM_RZR_RESET
Reset scripts from current object.
LM_RZR_EVTREADY <resizer-number>
Raises when resizer script is ready.
Can be used to set resizer params.
LM_RZR_EVTSCALE <scale>
Raises when scale is send to child resizer
LM_RZR_EVTDONE <resizer-number>
Raises when scale has been done
Here is a little silly example how you can controle Resizer Script from an external script.
//------------------------------------------------------------------------------
// IOL Resizer v 0.010
// Lalwende Leakey
// 12/02/2010
//------------------------------------------------------------------------------
// Resize API Sample
//------------------------------------------------------------------------------
// Resizer API Declarations
// Commands
integer LM_RZR_SETPARAMS = 24001; // Set resizer parameters <parameters-flags>
integer LM_RZR_SCALE = 24002; // Scale objetcts set <propage> <scale>
integer LM_RZR_REMOVESCRIPT = 24003; // Remove Scripts
integer LM_RZR_RESET = 24004; // Reset Scripts
// Events
integer LM_RZR_EVTREADY = 24010; // Raises when resizer script is ready <resizer-number>
integer LM_RZR_EVTSCALE = 24011; // Raises when several resizer script are used <scale>
integer LM_RZR_EVTDONE = 24012; // Raises when scale has been done <resizer-number>
// Parameters
integer RZR_SHOWMENU = 0x01; // Enable / Disable
//-------------------------------------------------------------------
// Global Variables
integer mDebug = FALSE; // Debug Flag
integer mIsReady; // Resize is ready
float mScale = 1.0; // Scale ratio
integer mTest; // Silly test counter
//------------------------------------------------------------------------------
default {
state_entry() {
// force reset of scripts
llMessageLinked(LINK_THIS, LM_RZR_RESET, "","");
}
// linked messages from other scripts
link_message(integer sender, integer lm, string params, key id) {
list lparam = llParseStringKeepNulls(params,["¤"],[]);
integer nparam = llGetListLength(lparam);
if (mDebug) llOwnerSay("DEBUG: " + (string)lm + " " + params);
// resizer is ready <resizer-number>
if (lm == LM_RZR_EVTREADY) {
// desactivate resizer menu once the resizer is ready
if (llList2String(lparam, 0) == "0") {
llMessageLinked(LINK_THIS, LM_RZR_SETPARAMS, "0", "");
mIsReady = TRUE;
}
}
}
// object has been touch
touch_start(integer num_detected) {
if (!mIsReady) return;
// perform a silly example (+10% during 10 touch then reset)
mTest++;
if (mTest < 10) mScale = mScale * 1.1;
else {mTest = 0; mScale = 1.0; }
llMessageLinked(LINK_THIS, LM_RZR_SCALE, "1¤" + (string)mScale, "");
}
}

You may Prim Resizer Script

Shop in world
Second Life Marketplace™
Next PostNewer Post Previous PostOlder Post Home

0 commentaires: