Jump to content

Xiija

Resident
  • Posts

    912
  • Joined

  • Last visited

Everything posted by Xiija

  1. mebbe something like... rotate your prim 90 degress, (resize if neccesary) and then rotate your texture -90 degrees?
  2. the LSL function you need is ... http://wiki.secondlife.com/wiki/LlSetDamage and a timer to make it fire over time perhaps?
  3. you can do this by playing a groundsit type animation from your obj / HUD. you can stand by clicking your obj / HUD's stand option, but as far as i know, there is no way to force someone to sit ( shift alt s ) with scripts
  4. try looking here http://wiki.secondlife.com/wiki/LlParcelMediaCommandList
  5. http://www.free-lsl-scripts.com/cgi/freescripts.plx?Category=Updater
  6. you could do this if you use flags... one flag would be set when the user clicks the package...."inUse" then, if anyone else clicks the package, if the InUse flag is true, it wont let them do anything...... you could name all your items to include a keyword.....i . e . "mesh Hair ( package)" "mesh hair ( partial)" "mesh hair ( demo)" and then use a loop to check for the sub string in your listen event (the message from the dialog) else if(msg == "DEMO") { integer inventoryNumber = llGetInventoryNumber(INVENTORY_OBJECT); integer index; string itemName; do { itemName = llGetInventoryName(INVENTORY_OBJECT, index); string CHECKitemName = llToLower(itemName); integer isDEMO = ~llSubStringIndex(CHECKitemName,"demo"); if(isDEMO) { llGiveInventory(user, itemName);// 2.0 seconds delay llSay(0,"DEMO SENT"); } } while(++index < inventoryNumber); init(); } this snippet sends any item with the word "demo" in it... then sets the package back to normal in the user made Init() ... function if your customer has chosen the option to buy something, you can change the click action to pay....and a pay box will come up... if(msg == "Buy") { recipient = user; llInstantMessage(user, "\nPlease touch again to buy, you have 30 seconds..."); llSetPayPrice(PAY_HIDE, [price, PAY_HIDE, PAY_HIDE, PAY_HIDE]); llSetClickAction(CLICK_ACTION_PAY); llSetTimerEvent(30); } a note: ... you should set hover text to show that the package is in use, as anyone who left clicks & chooses pay, can still bypass the touch event "inUse" flag. finally, use flags & loops to get your items into lists, using the keywords in their names, and when all done, reset the flags & click actions etc.... definately do-able.... tho i think not too many people use this method? i agree with Qie on using seperate prims for each offering
  7. The Second Life Roller Derby Association is a non profit league dedicated to bringing the sport of roller derby to Second Life. With the support of our sponsors, fans and players we are able to provide a FREE membership to anyone interested in joining. SLRDA will be holding a week long recruitment fair starting on Friday April 18th and running until Friday April 25th. The fair will run 24/7 with practices and special events throughout the week! Our sponsors have set up some FREE GIFTS, vendors and GACHAS for your shopping pleasure and at the end of the week FUZZY Entertainment will be holding a ROLLING STONES Concert at our SIM. Visit the LM for a full schedule of events and more info on how to join the ONLY LIVE ACTION roller derby league in SL! http://maps.secondlife.com/secondlife/Lilac%20Island/52/64/1893 ____________________________________________________
  8. you will need 2 scripts, one for the HUD and one for the worn item. the HUD can be a simple Touch event that sends a message via shout,say, whipser, regionsay etc. the worn item script will need a listen event, and should request perms for animations, and when the correct message is recieved, uses http://wiki.secondlife.com/wiki/LlSetLinkPrimitiveParamsFast#llSetLinkPrimitiveParamsFast to change the texture... and then uses .... http://wiki.secondlife.com/wiki/LlStartAnimation to play the animation The scipting itself is "relatively simple" ....you could attempt it yourself, or post in the Wanted forums to get someone to make it for you?
  9. for joystick configuration....Avatar > Move & view > movement > joystick configuration some links..dunno if this helps.... http://wiki.secondlife.com/wiki/Video_Tutorial/SpaceNavigator/Summary,_buttons,_&_more_tips http://wiki.secondlife.com/wiki/Video_Tutorial/SpaceNavigator/Getting_started http://wiki.secondlife.com/wiki/Video_Tutorial/SpaceNavigator/Advanced_customization http://wiki.secondlife.com/wiki/Flycam
  10. you just need a timer for that, if you want the contents, you need a way to get them into a list. i'm not sure how much text can be shown in hover tho... //////////////////////////////// Floating Name Script By Xylor Baysklef//// This script periodically updates// the text above the object to// display the name of the object///////////////////////////////integer SIDE_TO_CHECK_COLOR = 0;UpdateText() {vector RGB = llGetColor(SIDE_TO_CHECK_COLOR);// Rotate the Hue 180 degrees, and// invert the Luminance.RGB.x = 1.0 - RGB.x;RGB.y = 1.0 - RGB.y;RGB.z = 1.0 - RGB.z;llSetText(llGetObjectName(), RGB, 1.0);}list getInventoryList() // a function to get all the contents names except the scriptname, into a list{ integer i; integer n = llGetInventoryNumber(INVENTORY_ALL); list result = []; for( i = 0; i < n; i++ ) { if (llGetInventoryName(INVENTORY_ALL, i) != llGetScriptName()) { string itemName = llGetInventoryName(INVENTORY_ALL,i); result += [itemName ]; // llSleep(0.1); } } return result;}list contents;string tmp;default { state_entry() { UpdateText(); // Update the text every 5 seconds. // llSetTimerEvent(5.0); } touch_start(integer num) { contents = getInventoryList(); tmp = llDumpList2String(contents, " , "); llSetText(tmp, <1,1,1>,1.0); llSetTimerEvent(5.0); // wait 5 seconds, then send to timer } changed(integer change) { if (change == CHANGED_COLOR) { UpdateText(); } } timer() { llSetText("", <1,1,1>,1.0); // set text to blank llSetTimerEvent(0.0); // turn off timer till next touch }}// END //
  11. say your timer sends a request every 2 mins. you send the first request, and 2 minutes later your timer event checks to see if it is okay to send another request. .. if it has not recieved a response yet, it waits another 2 mins and checks again. no need for another timer...although you can use llSensorRepeat, and a no_sensor() event as a second timer hack
  12. or use a toggle , and set it to true when you send your request .... InUse = TRUE; and change that only when your current request has been answered... // if you have gotten an http response InUse = FALSE then in your timed sender... if( InUse == FALSE) { // send next request }
  13. not sure if this helps at all ..... state_entry() { //Get my comms channels HUD_CHAN_CALL = 0x80000000 | (integer)("0x"+(string)llGetOwner()); HUD_CHAN_RTRN = HUD_CHAN_CALL - 1; //My Name MY_NAME = llGetScriptName(); //Get all the scripts in the prim //Set them all (except me) to not running integer num = llGetInventoryNumber(INVENTORY_ALL); string name; integer x; integer type; for (x = 0; x < num; x++) { name = llGetInventoryName(INVENTORY_ALL, x); type = llGetInventoryType(name); if (type == INVENTORY_SCRIPT) { if (name != MY_NAME) { integer scriptState = llGetScriptState(name); do { llSetScriptState(name, FALSE); } while( llGetScriptState(name) ); } } } } changed(integer change){ //Could be that scripts have changed .. need to turn them off if (change & CHANGED_INVENTORY) { llResetScript(); } } Use a do-while to keep trying to change the script state...till it finally turns off
  14. you can also try... (cntrl -alt-Q ) Develop menu > show info > show color under cursor
  15. The HarleyQuinns take on the unbeatable Riot Bitches! Come watch the titans FALL! The HarleyQuinns RollerDerby Team! LM : http://maps.secondlife.com/secondlife/Larsen/42/161/1573 please descript to under 20 :)
  16. The Last Day to ride the sky vehicles, hear the performers, and just have a blast :) some pics... https://www.flickr.com/photos/100198644@N04/sets/72157643132007654/ the LM .. http://maps.secondlife.com/secondlife/Burning%20Man-%20Deep%20Hole/236/79/25 Come hang out...as always, everything is FREE :)
  17. here is a basic script for this....try it and experiment with it key owner;integer tog;string sound;default{ state_entry() { owner = llGetOwner(); sound = llGetInventoryName(INVENTORY_SOUND, 0); // get the name of the first sound in your object's inventory // or sound = "a603082a-b8b4-f850-9cbf-4670c1510573"; the UUID of your sound // or sound = "my_sound"; the actual name of the sound you want to play llSetTimerEvent(1.0); } timer() { if (llGetAgentInfo(owner) & AGENT_TYPING) { if( !tog ) // same as if (tog == 0) { llPlaySound(sound, 1.0); //Play it once , tog = 1; // then switch the tog to keep it from playing again } } else { tog = 0; // then switch tog back when you stop typing } }}
  18. on mp... https://marketplace.secondlife.com/stores/11557 in world with demos.. http://maps.secondlife.com/secondlife/Nori/100/193/22
  19. As far as scripted movement, you could use something like this.... in your state entry.. llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE); in your timer ( this example is in a sensor and uses a target) pos = llGetPos(); vPosTarget = llDetectedPos(0); llSetStatus(STATUS_PHYSICS,FALSE); llRotLookAt( llRotBetween( <1.0, 0.0, 0.0>, llVecNorm( <vPosTarget.x, vPosTarget.y, pos.z> - pos ) ), 1.0, 0.5 );// face target llMoveToTarget( vPosTarget + <-1.0,-1.0,0.2>,3.50); // move to target with a little offset llSetStatus(STATUS_PHYSICS, TRUE); // set status after the move seems to work best? llSetTimerEvent(0.1);
  20. Xiija

    Help with door

    here is another one that works with non cut doors...i think it can be linked too, tho i commented out the link part, to use with a single prim door.. /* * Smooth Rotating Linked Door With Hinge * * By: Lyn Mimistrobell * Version: 1.1 * License: Do whatever you like with it, just don't blame me if you break it */ /* * Define the rotation in degrees, using the door prim's local coordinate * system */vector ROTATION = <0.0, 0.0, 80.0>; /* * Define the position of the virtual hinge; usually this is half the door * prim's width and thickness */vector HINGE_POSITION = <-0.8, 0.05, 0.0>; /* * Define how fast the door opens, in seconds */float SECONDS_TO_ROTATE = 1.0; /* * Define after how much time the door should close automatically, in seconds; * set to 0.0 to disable autolmatic closing */float AUTO_CLOSE_TIME = 5.0; /* * Define a sound that plays when the door starts to open; set to NULL_KEY * for no sound. */key SOUND_ON_OPEN = "e5e01091-9c1f-4f8c-8486-46d560ff664f"; /* * Define a sound that plays when the door has closed; set to NULL_KEY * for no sound. */key SOUND_ON_CLOSE = "88d13f1f-85a8-49da-99f7-6fa2781b2229"; /* * Define the volume of the opening and closing sounds */float SOUND_VOLUME = 1.0; /* * NORMALLY, THERE IS NO NEED TO CHANGE ANYTHING BELOW THIS COMMENT. IF YOU DO * YOU RISK BREAKING IT. */ integer gClosed; // Door state: TRUE = closed, FALSE = openedrotation gRotationClosed; // Initial rotation of the door (closed)vector gPositionClosed; // Initial position of the door (closed)vector gRotationPerSecond; // The amount to rotate each second doOpenOrClose() { /* * Only perform the rotation if the door isn't root or unlinked */ integer linkNumber = llGetLinkNumber(); // if (linkNumber < 2) **** comented out for a single prim door // return; **** comented out for a single prim door if (gClosed) { /* * Store the initial rotation and position so we can return to it. * * Rotating back purely by calculations can in the longer term cause the door * to be positioned incorrectly because of precision errors * * We determine this everytime before the door is being opened in case it was * moved, assuming the door was closed whilst being manipulated. */ gPositionClosed = llGetLocalPos(); gRotationClosed = llGetLocalRot(); /* * Play the opening sound and preload the closing sound */ if (SOUND_ON_OPEN) llPlaySound(SOUND_ON_OPEN, SOUND_VOLUME); } vector hingePosition = gPositionClosed + HINGE_POSITION * gRotationClosed; /* * Reset the timer and start moving */ llResetTime(); while (llGetTime() < SECONDS_TO_ROTATE) { float time = llGetTime(); if (! gClosed) /* * Invert the timer for closing direction */ time = SECONDS_TO_ROTATE - time; rotation rotationThisStep = llEuler2Rot(gRotationPerSecond * time) * gRotationClosed; vector positionThisStep = hingePosition - HINGE_POSITION * rotationThisStep; llSetLinkPrimitiveParamsFast(linkNumber, [PRIM_ROT_LOCAL, rotationThisStep, PRIM_POS_LOCAL, positionThisStep]); } /* * Set the new state */ gClosed = !gClosed; if (gClosed) { /* * Finalize the closing movement */ llSetLinkPrimitiveParamsFast(linkNumber, [PRIM_ROT_LOCAL, gRotationClosed, PRIM_POS_LOCAL, gPositionClosed]); /* * Play the closing sound and preload the opening sound */ if (SOUND_ON_CLOSE) llPlaySound(SOUND_ON_CLOSE, SOUND_VOLUME); if (SOUND_ON_OPEN) llPreloadSound(SOUND_ON_OPEN); } else { /* * Finalize the opening movement */ rotation rotationOpened = llEuler2Rot(ROTATION * DEG_TO_RAD) * gRotationClosed; vector positionOpened = hingePosition - HINGE_POSITION * rotationOpened; llSetLinkPrimitiveParamsFast(linkNumber, [PRIM_ROT_LOCAL, rotationOpened, PRIM_POS_LOCAL, positionOpened]); /* * Preload the closing sound */ if (SOUND_ON_CLOSE) llPreloadSound(SOUND_ON_CLOSE); /* * Set a timer to automatically close */ llSetTimerEvent(AUTO_CLOSE_TIME); }} default { state_entry() { /* * Assume the door is closed when the script is reset */ gClosed = TRUE; /* * These doesn't change unless the script is changed, calculate them once */ gRotationPerSecond = (ROTATION * DEG_TO_RAD / SECONDS_TO_ROTATE); /* * Preload the opening sound */ if (SOUND_ON_OPEN) llPreloadSound(SOUND_ON_OPEN); } touch_start(integer agentCount) { doOpenOrClose(); } timer() { llSetTimerEvent(0.0); /* * Close the door if it isn't already closed */ if (! gClosed) doOpenOrClose(); }}
  21. Xiija

    Help with door

    try this.. rotation Rot;default{ state_entry() { Rot = llEuler2Rot(<0.0, 0.0, 90.0>*DEG_TO_RAD); } touch_start(integer total_number) { llSetRot(Rot*llGetLocalRot()); Rot=ZERO_ROTATION/Rot; //invert the rotation }} the <0.0, 0.0, 90.0> rotates around the Z axis...you can change it if your door rotates around a different axis. ( this works only if you path cut the door so only half is visible.)
  22. works perfect! tysm i can now use strings like llGetAnimationOverride & llGetAnimation to access the info i need here is what i'm playing with so far .... string AnimStates;string name;integer ttl_NC;integer NC_lines;key query_id;integer count;string CurrNC;integer card_index;key kQuery;integer index;init(){ ttl_NC = llGetInventoryNumber( INVENTORY_NOTECARD ); CurrNC = llGetInventoryName(INVENTORY_NOTECARD,0); kQuery = llGetNotecardLine(CurrNC, count); } read_card(){ CurrNC = llGetInventoryName(INVENTORY_NOTECARD,card_index); kQuery = llGetNotecardLine(CurrNC, count); }default{ state_entry() { AnimStates = llList2Json( JSON_OBJECT, ["Walking","","Standing","", "Sitting", "","Dances",""]); init(); } touch_start(integer total_number) { name = "Sitting"; string s = llJsonGetValue(AnimStates, [name, index]); llOwnerSay(name + " animation at index " + (string)index +" is: " + s); } dataserver(key query_id, string data) { if (query_id == kQuery) { if (data == EOF) { count = 0; ++card_index; llOwnerSay( CurrNC + " Notecard loaded"); if( card_index < ttl_NC) { read_card(); } else { llOwnerSay( " ALL Notecards loaded"); card_index = 0; } } else { AnimStates = llJsonSetValue( AnimStates, [CurrNC, JSON_APPEND], (string)data); ++count; kQuery = llGetNotecardLine(CurrNC, count); } } } changed(integer change) { if (change & CHANGED_INVENTORY) { llOwnerSay("The inventory has changed."); llResetScript(); } }} this is reading all my notecards & adding the info to the arrays perfectly
  23. trying to do a basic array...cant remember what i'm doin wrong :P this is supposed to be an object with arrays for each animation state? string AnimStates; string name; string SIT_anims; string ST_anims; string W_anims; init() { AnimStates = llJsonSetValue( "Walks",[W_anims,0], "w0"); AnimStates = llJsonSetValue( W_anims, [JSON_APPEND], "w1"); } default { state_entry() { SIT_anims = llList2Json( JSON_ARRAY, [JSON_NULL]); ST_anims = llList2Json( JSON_ARRAY, [JSON_NULL]); W_anims = llList2Json( JSON_ARRAY, []); AnimStates = llList2Json( JSON_OBJECT, ["Walks",W_anims,"Stands",ST_anims, "Sits", SIT_anims]); init(); } touch_start(integer total_number) { name = "Walks"; string s = llJsonGetValue(AnimStates, [name,W_anims]); // string s = llJsonGetValue(name, [W_anims,1]); llOwnerSay(" got " + s); } }
  24. in your ingredients objects, to make them disappear, you need a listen script default{ state_entry() { llListen(-123, "", "", ""); } listen(integer channel, string name, key id, string msg) { if(msg == "DIE") { llDie(); } }} in your main obj, you need something like this... list ingredients;list found;string new = "Object d";default{ state_entry() { ingredients = ["Object a","Object b","Object c"]; } touch_start(integer total_number) { llSensor( "", NULL_KEY, ( PASSIVE | ACTIVE ), 10.0, PI ); // scan 10 meter circle around the main object } sensor( integer detected ) { found = []; while(detected--) { string name = llDetectedName(detected); if (~llListFindList(ingredients,[name])) { if (!~llListFindList(found,[name])) { found += name;} } } if( llGetListLength(ingredients) == llGetListLength(found) ) { llSay(0," completed"); llRezAtRoot(new, llGetPos() + <0,0,1>, ZERO_VECTOR, ZERO_ROTATION, 0); llSay(-123,"DIE"); } else { llSay(0,"incomplete"); } }} this will only work if exactly the 3 objects are used, . change object names, and chat / listen channels to your liking this will rez the Object d ... 1 meter above your main object ... llGetPos() + <0,0,1> <0,0,1> can be changed to where ever you want the new object to rez. <1,0,0> is 1 meter in front, <0,1,0> is 1 meter to the side
×
×
  • Create New...