Jump to content

Xiija

Resident
  • Posts

    920
  • Joined

  • Last visited

Everything posted by Xiija

  1. vector BLUE = <0.000, 0.455, 0.851>; vector AQUA = <0.498, 0.859, 1.000>; vector TEAL = <0.224, 0.800, 0.800>; vector OLIVE = <0.239, 0.600, 0.439>; vector GREEN = <0.180, 0.800, 0.251>; vector LIME = <0.004, 1.000, 0.439>; vector YELLOW = <1.000, 0.863, 0.000>; vector ORANGE = <1.000, 0.522, 0.106>; vector RED = <1.000, 0.255, 0.212>; vector MAROON = <0.522, 0.078, 0.294>; vector FUSCHIA = <0.941, 0.071, 0.745>; vector PURPLE = <0.694, 0.051, 0.788>; vector WHITE = <1.000, 1.000, 1.000>; vector SILVER = <0.867, 0.867, 0.867>; vector GRAY = <0.667, 0.667, 0.667>; vector DARKGRAY =<0.255, 0.255, 0.255>; vector BLACK = <0.00, 0.00, 0.00>; float red=1.0; float green=0.0; float blue=0.0; vector startColor = <red, green, blue>; vector endColor = <red, green, blue>; default { state_entry() { llListen(10, "", "", ""); llSetLinkPrimitiveParamsFast(LINK_ROOT, [ PRIM_COLOR, ALL_SIDES, BLACK, 1.0, PRIM_POINT_LIGHT, FALSE, WHITE, 1.0, 10.0, 0.6]); } on_rez(integer message) { llResetScript(); } listen(integer channel, string name, key id, string message) { if(message == "rainbow") { llSetTimerEvent(0.2); } else if(message == "test") { llSetTimerEvent(0.0); llSetLinkPrimitiveParamsFast(LINK_ROOT, [ PRIM_POINT_LIGHT, TRUE, WHITE, 1.0, 10.0, 0.6, PRIM_LINK_TARGET, 4, PRIM_COLOR, ALL_SIDES, WHITE, 1.0, PRIM_FULLBRIGHT, ALL_SIDES, TRUE, PRIM_GLOW, ALL_SIDES, 0.0 ]); } } timer() { if(red >= 1.0) { if (blue > 0.1) {blue = blue - 0.1;} else {green = green + 0.1;} } if(green >= 1.0) { if (red > 0.1) {red = red - 0.1;} else {blue = blue + 0.1;} } if(blue >= 1.0) { if (green > 0.1) {green = green - 0.1;} else {red = red + 0.1;} } startColor = <red, green, blue>; endColor = <red, green, blue>; llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE, <red,green,blue>, // light color vector range: 0.0-1.0 *3 1.0, // intensity (0.0-1.0) 20.0, // radius (.1-10.0) 1.0 ]); // falloff (.01-1.0) llSetLinkColor(LINK_ALL_CHILDREN, <red,green,blue>, ALL_SIDES); } }
  2. { I will be happy just to stop a subsequent rezzing after the first calling of the script } *Use a flag to tell if the rezzer has been clicked once. integer flag; default { touch_start(integer total_number) { if( ! flag) { llRezObject("RedWall1", <76.03231, 108.57102, 36.19455>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0); llRezObject("RedCarpet", <76.01010, 112.28984, 33.91292>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0); llRezObject("RedWall2", <68.57831, 112.27352, 36.19455>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0); llRezObject("RedWall3", <76.44621, 115.93255, 36.21640>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0); llRezObject("RedCeiling", <76.04484, 112.28984, 38.42974>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0); flag = 1; } } }
  3. The BURN2 2015: Carnival of Mirrors officially closes today !!! the Lamplighters last processions will be at 11:30 am SLT & 5:30 PM SLT. Temple Burns are at Noon & 6 PM. SLT ( SLT = pacific time) FREE gifts, rides, art, Dj's Music ... tottaly free event! Come on out and see what you have been MISSING! .... LAST DAY, LAST CHANCE !!! http://maps.secondlife.com/secondlife/Burning%20Man-%20Deep%20Hole/94/33/25 Burn On! Ranger Xiija
  4. some links you may need... 1. touch ... http://wiki.secondlife.com/wiki/Touch 2. give item ... http://wiki.secondlife.com/wiki/LlGiveInventory 3. destroy itself ... http://wiki.secondlife.com/wiki/LlDie 4 After x days ... http://wiki.secondlife.com/wiki/Timer each page should have script examples Luck!
  5. it's just basic Media on a Prim, MOAP .. one link that may help... http://wiki.secondlife.com/wiki/LlSetLinkMedia there is a free HUD for this at burningman in SL this week, http://maps.secondlife.com/secondlife/Burning%20Man-%20Deep%20Hole/94/33/25 in frog pond sim at the back, look for a gypsy fortune teller booth and a mask with fire falling from the eyes.
  6. The BURN2 2015: Carnival of Mirrors officially opens with the Lamplighters procession at 12:00pm SLT on Saturday the 17th of October and runs through the 25th of October. FREE gifts, rides, art, Dj's Music ... tottaly free event! Come on out and see what you have been MISSING! http://maps.secondlife.com/secondlife/Burning%20Man-%20Deep%20Hole/94/33/25 Burn On! Ranger Xiija
  7. Plot sales still Open! Come get a space and join the festival ! BurningMan regional BURN2 2015 Oct 17-25 jouin the Burningman 2.0 group (free) for info! 
  8. $L250 - https://marketplace.secondlife.com/p/Scobas-Employee-Timekeeper/1034732 $L229 - https://marketplace.secondlife.com/p/Full-perm-script-Employee-Time-tracker/938899
  9. starting with a delay... your timer is probably waiting before it fires the first time? your call that sets the timer event should be llSetTimerEvent(0.1) , then IN your timer event, reset the timer to what ever length you have , ex: llSetTimerEvent(10.0) , as for adding sounds, you could make a list of the sounds and instead of loopin, use llPlaySound and run thru the list using a count variable. list sounds = [ "5aed16f9-53ba-57e1-f3cb-2ff36d89343f", " (2ndUUD) ", " ( 3rd UUID) "] integer count = 0; and in the timer, increment the count variable... ++count; if(count > llGetListLength(sounds) ) { count = 0; } string curSound = llList2String(sounds,count); llPlaySound(curSound,1.0); etc, etc ...
  10. you can get a demo skate HUD from SLRDA ( Second Life Roller Derby Assoc) for free, or a full HUD for $L25 at Thunder_Village sim. try it and see if that is the motion you seek? the gliding down hill is used in them, wear with any skates you have. ( you can join the SLRDA member group for free to get notices and rink locations etc. ) hope this helps.. Xiija, Babe X on the Black Eyed Betties RollerDerby team (season opener Sun,Sept 13th)
  11. for sitting and standing use the changed event... ( changed link) http://wiki.secondlife.com/wiki/Changed changed(integer change) { // check if link set got changed if(change & CHANGED_LINK) { key av = llAvatarOnSitTarget(); if (av) // evaluated as true if key is valid and not NULL_KEY { llSetLinkAlpha(LINK_THIS, 0.0, ALL_SIDES); } // nothing is sitting on the object else { llSetLinkAlpha(LINK_THIS, 1.0, ALL_SIDES); } } }
  12. check MP ? a book ... https://marketplace.secondlife.com/p/Phun-Physics-Simulation-Book/463618 a kit ... https://marketplace.secondlife.com/p/BC-Hydraulics-Suspension-Kit-25-Lowrider/590177 a car ... https://marketplace.secondlife.com/p/SSP-Classic-Micro-SCooper/4968736
  13. just take the stuff from the touch event, and put it in the changed event? kinda like so? default { state_entry() { // set position and rotation for an avatar to sit on an prim llSitTarget(<0,0.1,0>,ZERO_ROTATION); } on_rez(integer ignoreme) { llOwnerSay("Place this near Tentaculus Infestus - tentacles will reach towards sitter.\n Full-perm script inside demonstrates how this is done.\nNOTES:\n - dialog channel 6 is assumed, and is the default.\n - Infestus trigger should be set to External."); } touch_start(integer total_number) { vector pos = llDetectedPos(0); llSay(dialog_channel, "reachpos " + (string)llGetPos()); // or to have tentacles point towards toucher use ... llSay(dialog_channel, "reachpos " + (string)pos); } changed(integer change) { // check if link set got changed if(change & CHANGED_LINK) { key av = llAvatarOnSitTarget(); if (av) // evaluated as true if key is valid and not NULL_KEY { llSay(dialog_channel, "etrig " + llKey2Name(av) ); // will reach towards ANY avatar sitting, not just owner } else // nothing is sitting on the object { llSay(dialog_channel, "endreach"); } } } }
  14. in your control events you can also experiment with llSetForce() .. http://wiki.secondlife.com/wiki/LlSetForce and llApplyImpulse(); ... http://wiki.secondlife.com/wiki/LlApplyImpulse something like this for a skate HUD .... control(key id, integer held, integer edge) { /* integer start = level & edge; integer end = ~level & edge; integer held = level & ~edge; integer untouched = ~(level | edge); */ if(held & CONTROL_FWD) { if(llGetAgentInfo(owner) & AGENT_WALKING) { if( ! Movingtog) { CurrAnim = "Skating"; llStartAnimation(CurrAnim); llSetForce(<1,0,0>, TRUE); Movingtog = 1; } } else { } } if(edge & CONTROL_FWD) // stopped forward move { if(llGetAgentInfo(owner) & AGENT_WALKING) { llStopAnimation(CurrAnim); CurrAnim = "Gliding"; llStartAnimation(CurrAnim); llSetTimerEvent(1.0); Movingtog = 0; } else // moving forward { llStopAnimation(CurrAnim); CurrAnim = "Skating"; llStartAnimation(CurrAnim); llSetForce(<1,0,0>, TRUE); } } } timer() { llSetForce(<0,0,0>, TRUE); llSetTimerEvent(0); }
  15. Free plots for camping / building still available, Come join the FUN! 
  16. you can't use a string as a pointer to a list like that, you have to compare strings, and then do IF statements? ( sorry, only way) kinda like so list theme_1 = ["one","<1.00,1.00,1.00>","<1.00,1.00,1.00>","<1.00,1.00,1.00>"];list theme_2 = ["two","<1.00,0.00,1.00>","<0.00,0.00,0.00>","<1.00,1.00,0.00>"];list theme_3 = ["three","<1.00,1.00,0.00>","<1.00,1.00,1.00>","<1.00,0.00,1.00>"];ChangeTheme(){ // WOULD MAKE THE COLORS HERE FROM LIST if(theme_name == "theme_1") { currList = theme_1; } llOwnerSay("changing " + llList2String(currList,0) );}integer count;integer position;string theme_name;list currList;default{ touch_end(integer total_number) { ++count; position = count%3 + 1; theme_name = "theme_"+(string)position; ChangeTheme(); }} put this in a cube and keep clicking it .. the user function will fire when its on the *theme_1* list?
  17. SL is a good platform for delevoping.... SL games. the LSL coding language does not lend itself to normal programming? ::shrugs::
  18. like this? https://marketplace.secondlife.com/p/Shoutcast-Reseller/4544388
  19. here is an example with llCastRay http://wiki.secondlife.com/wiki/LlCastRay try it with a 0.02 sec timer mebbe? .. this will cast a ray 3 meters to the left? vector start; vector floor; vector offset; vector adj; list name; key keynm; string Vname; list vec = []; timer() { start = llGetPos(); list results = llCastRay(start,start + <0,3.0,0>, [ RC_REJECT_TYPES , RC_REJECT_LAND | RC_REJECT_PHYSICAL | RC_REJECT_NONPHYSICAL, RC_MAX_HITS, 1, RC_DETECT_PHANTOM, FALSE ]); name = llList2List(results,0,0); keynm = llList2Key(name,0); Vname = llKey2Name(keynm); vec = llList2List(results,1,1); floor = llList2Vector(vec,0) ; offset = (start - floor); adj = <0.0,0.0,0.5>; if(vec) { llSay(0,"Avatar Detected: " + Vname); } }
  20. for different links, use SLPPF ... http://wiki.secondlife.com/wiki/LlSetLinkPrimitiveParamsFast#llSetLinkPrimitiveParamsFast for mesh, you have to texture the different faces in your mesh program to have them recognized as faces in SL?
  21. here is a basic health bar script, it uses a list of characters to display the health bar. you could start with this and mod it to fit your needs? it works on collisions, though many systems now use castray on their weapons to get rid of rezzing temp prims. notice how the list uses the health variable index with llList2List, it also changes color of the hovertext. to see what it looks like, put this script in a prim and wear it, then rez a pole to bump into and watch the hovertext when you collide with the pole? integer health = 10;string pList ;list zList = [];vector color = <0,1,0>;list Charsetx = ["*","█","█","█","█","█","█","█","█","█"];default{ state_entry() { llSetText("Health: " + (string)health + " " + llDumpList2String(Charsetx,"" ), color, 1.0); } collision_start(integer num) { health -= num; llOwnerSay("health " + (string)health); if(health < 7) { color = <1,1,0>;} if(health < 4) { color = <1,0,0>;} if(health == 0) { llOwnerSay("dead"); // put delay here for regen health = 10; color = <0,1,0>; } zList = llList2List(Charsetx,0,health); pList = llDumpList2String(zList,"" ); llSetText("Health: " + (string)health + " " + pList, color, 1.0); }}
  22. if you need to do just one or two things, you could also use a user defined function in stead of switching to a new state? something like... integer attached;integer rezzed;runAttachFunction(){ // code to do something when attached}runRezFunction(){ // code to do something when rezzed}default{ state_entry() // run whenever the script is reset { } on_rez(integer start_param) //run when rezzed or worn { rezzed = TRUE; if(llGetAttached() ) { attached = TRUE; } if(attached) { runAttachFunction(); // do something when attached } else { runRezFunction(); // do something when rezzed } } touch_start(integer total_number) { if(attached) { llSay(0, "wearing."); // do something if clicked while attached } else { llSay(0, "rezzed."); // do something if clicked while rezzed } } changed(integer change) // recheck perms by resetting script { if (change & CHANGED_TELEPORT | change & CHANGED_REGION) { llResetScript(); } }} ___________________________________________ you can use the changed event to recheck your perms on teleport or region change.
  23. send a RegionSayTo ... to the eyes, and have a script in the eyes that listens? http://wiki.secondlife.com/wiki/LlRegionSayTo something like this ... key id = " *uuid of eye prim* "; integer chan = -12321; // replace your llSettexure with a region say llRegionSayTo(id, chan, message + " " + side); and in the eye prim, listen(integer channel, string name, key id, string message) { list myList = llParseString2List(message,[" "],[]; string texture = llList2String(myList,0); integer side = llList2String(myList,1); llSetTexture(texture, side); } etc, etc
  24. Sassy has a good point about resetting the script. from the llRezObject page .. http://wiki.secondlife.com/wiki/LlRezObject ** If the owner of the object does not have copy permission on inventory, the object will no longer be present in inventory after it is rezzed (so another attempt to rez (the same object) will fail); ** One could sell ammo clips with 20 bullets in them, and make the bullets NoCopy , so they would only rez till they are gone from inventory, and then the gun could give the "out of ammo" msg / sound?
×
×
  • Create New...