Jump to content

MrBobbins

Resident
  • Posts

    12
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Innula, thanks for the very very fast reply, I really love that you hekped so quick. In the time that I took to post, and wait for a reply, I decided to have one more bash at the code, and fixed it, I looked too hard at it trying to be complicated. I took a step back, and as exactly as you suggested, i did... I'm so sorry for wasting your time, but I do hope someone with a similar query would find this useful. Here's the code I did while you were typing up your reply... integer on = TRUE;default{ state_entry() {//Nuffin } touch_start(integer x) { if (on == TRUE) { // Turn Light On llPlaySound("sound1", 0.5); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_POINT_LIGHT,TRUE,<1.0, 0.502, 0.0>,1.0,15,0.750, PRIM_TEXTURE, 1, "lamplighton", <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_FULLBRIGHT, 1, TRUE, PRIM_GLOW, 1, 0.1, PRIM_TEXTURE, 2, "lamplighton", <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_FULLBRIGHT, 2, TRUE, PRIM_GLOW, 2, 0.1, PRIM_TEXTURE, 3, "lamplighton", <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_FULLBRIGHT, 3, TRUE, PRIM_GLOW, 3, 0.1, PRIM_TEXTURE, 4, "lamplighton", <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_FULLBRIGHT, 4, TRUE, PRIM_GLOW, 3, 0.1]); on = FALSE; } else if (on == FALSE) { // Turn Light Off llPlaySound("sound1", 0.5); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_POINT_LIGHT,FALSE,<1.0, 0.502, 0.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.0, PRIM_FULLBRIGHT, ALL_SIDES, FALSE, PRIM_TEXTURE, 1, "lamplightoff2", <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 2, "lamplightoff2", <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 3, "lamplightoff2", <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 4, "lamplightoff2", <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0]); on = TRUE; } }} 
  2. Hi everyone, I've written the following script with the knowledge I have and a wee bit of reaserch done. I've tried with all my might to bring in the llSetLinkParamsFast function with the LINK_THIS flag. The script is for a 1 prim mesh old fashioned lamp. Now before I go back to Blender and rebuild it. Theres 4 faces in the mesh I want to act as a light. I know the prim itself will become a light, but the 4 faces to act like the look like they are a light. I;ve created two textures, a "lighton" and a "light off", now this script works, but I'm getting the .2 delay with llSetPrimitiveParams, which makes the light operate in .2 second steps. From off, to on, full bright, get the glow, then turn on the lighting. Off is faster, I just call an ALL_SIDES integer to switch off glow and light. Now can I make this faster? or A little lighter on the code? Please help me. integer on = TRUE; string texture1 = "lamplighton"; string texture2= "lamplightoff2"; default { state_entry() { //Pray Scotland win the World Cup (any of them... doesn't matter) } touch_start(integer x) { if (on == TRUE) { // Light Is On llPlaySound("sound1", 0.5); llSetTexture(texture1, 1); llSetTexture(texture1, 2); llSetTexture(texture1, 3); llSetTexture(texture1, 4); llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE,<1.0, 0.502, 0.0>,1.0,15,0.750, PRIM_GLOW, 1, 0.1]); llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE,<1.0, 0.502, 0.0>,1.0,15,0.750, PRIM_GLOW, 2, 0.1]); llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE,<1.0, 0.502, 0.0>,1.0,15,0.750, PRIM_GLOW, 3, 0.1]); llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE,<1.0, 0.502, 0.0>,1.0,15,0.750, PRIM_GLOW, 4, 0.1]); llSetPrimitiveParams([PRIM_FULLBRIGHT, 1, TRUE]); llSetPrimitiveParams([PRIM_FULLBRIGHT, 2, TRUE]); llSetPrimitiveParams([PRIM_FULLBRIGHT, 3, TRUE]); llSetPrimitiveParams([PRIM_FULLBRIGHT, 4, TRUE]); on = FALSE; } else if (on == FALSE) { // Light Is off llPlaySound("sound1", 0.5); llSetPrimitiveParams([PRIM_POINT_LIGHT,FALSE,<1.0, 0.502, 0.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.0]); llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, FALSE]); llSetTexture(texture2, 1); llSetTexture(texture2, 2); llSetTexture(texture2, 3); llSetTexture(texture2, 4); llSetPrimitiveParams([PRIM_POINT_LIGHT,FALSE,<1.0, 0.502, 0.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.0]); llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, FALSE]); on = TRUE; } } }Now like I say, this script works the way I want it to, however, I may have written it inneficiently. Any help would be great. Thank you :) 
  3. Many thanks for the help, overlooking the script with tired eyes hadn;t helped me. Sorry for delay in thanking you guys, illness swept the household and we all suffered haha. Project is going amazingly well, with many thanks for your help. I really do appreciate it.
  4. Hi Rolig, thanks for your reply, I tried what you said and get a Syntax error on the changed 'else if'. I know am missing something somewhere, been staring at it so long I forget what is where.. argh.
  5. Hi everyone, I'm learning some functions for a project, I'm making some progress. I wanted to utilise a script available on wiki to serve some other functions with prims in a linkset. The script I have is as follows: 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); } } 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); llSetTimerEvent(0.2); } } if(message == "test") { 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]); } }Now the Vectors at the top with colours in CAPS is from a previous experiment I plan to use later on in this script. But the problem I am having is creating another 'if(message == "test")', I get syntax errors all over the place. And I looked and scraped, and wildcarded my script with brackets, and I just can't find it. If someone can help me, or explain a wee bit why its not working, I;d really appreciate it. Thank you \o/
  6. Thank you very much Rolig, got it now, blinded myself with investigating too many pages. Thanks very much for your help. Watch out mess, here I come with atimer loop event thingy \o/
  7. Hi all, I hope I described my problem well in the title. I have created an object, consisting of 25 prims. The prims are all linked in a spiral effect, with a long cylinder in the centre, acting as root. I have named the prims into 3 different groups. 'back', 'frontA', and 'frontB'. With the Root prim un-named in the linkset. I wish to create some colouring effects, which will be automatic, but before I can do that, I was wondering how I call up an individual 'group' to display a series of color. So 'frontA' will do some dancing, then switchoff, 'frontB' do its own dancing, switch off, then 'back' does it's dancing, switch off, then all of them do some dancing all the same, switch off, start at beginning again. I am fairly familiar with basic colour change and got a standard idea what I've to do, its just a wee bit of help to call up the individual 'groups' to then do the functions. Hope that was clear enough, thank you for reading.
  8. Hi guys, I've mustered up the energy to move my ass onto here to ask for help on awee build I'm doing. I'm not very well and I'm struggling using my brain, which is a challenge when I operate normally XD. Basically I have a series of spotlights, pointing up. These are arranged in a circular formation. What I envisage, is all these spotlights, facing up to start will be following/looking at an invisible prim. This invisible prim will move up, and down, a wide clockwise circle, complete, then anticlockwise, stop, then repeat. This movement, I am fine with, and the prim (not currently invisible) is doing what I want it to do \o/. But I just do not know where to start with these spotlights, so as the invisibale prims moves down, the spotlights move as if watching/pointing their beams to this prim, and basically every movement it makes. Making a nice little moving display of lighting. I hope someone can point me in the right direction to a script or something that I can achieve this with. Many thanks for reading, and I hope someone can help soon.
  9. Ahh I got it, thank you, now I know what to do. Many thanks for that wee kick up the backside, another avneue of approach I had not thought of. Luckily I don't have a feint heart hehe
  10. Just to add, I've just tried the orbiting method, with the main Cylindar linkage just there for aesthetics, but the 4 'claws' going round in an orbit, that works, but I have a feeling getting them to spin too will be a pain in the backside. If anyone has overcome this or something it'd be great to know.
  11. Hi folks, I'm trying to get my head round rotations and got the basics + a wee bit more solved with trial and error, but now on the 3rd day of trying snippets, changing and throwing tantrums am in a wee bit need of help. I want to make a horrific mixer type device. Where the central pont will be Cylinder, which will rotate either clockwise or anti-clockwise, doesn't matter. On top of this cynlinder, will be two cubes stretched out, axis meeting directly central to the main cylinder. This bit is fine, easy peasy for me. Now the tricky part, on the end of each of these stretched cubes, I have another cylinder coming down, into a little bundle of prims, I wash this to rotate in the alternative way to the rotation of the main cylinder. There are four in total of these 'arms'. I have tried the orbit method, in various ways, and learned many new things for different ideas, but this one has me stumped. If anyone could help, I'd be very grateful.
×
×
  • Create New...