Jump to content

naughtyniece

Resident
  • Posts

    71
  • Joined

  • Last visited

Everything posted by naughtyniece

  1. I have what i thought was a simple thing to do. On my SIM i have. a moving platform (with a seat) and i want to to move round the edge of the sim all the time, so point 1 to point 2, point 2 to point 3, point 3 to point 4 and back to point 1 and then again eternally.... I would like the ability to pause at a stop for a few seconds... but thats not a show stopper I have tried some tour scripts but they are over complicated i think for what i need, and they are old and very badly explained. Any advice, suggestions or point me in the right direction (its driving me mad) Thanks
  2. I have an object and if I place it on the floor and touch it, my script works perfectly, opens a dialog with several options, as expected However, if i attach the object to my Avatar, it does not respond when touched, do i need a different touch command or am i missing a simple thing? thanks a lot Joanie
  3. thank you both, cache cleared, re logged and all is good again. Much appreciated She is back
  4. Hi, am on iMac, and think graphic driver is up to date, will check, where is empty cache?
  5. This is totally new issue for me, an avatar has a pixelated face, but only to me, and i am on latest firestorm, and ultra quality (changing this has no effect) (pic attached) Any suggestions please?
  6. Hi, I have what i though would be simple, a chair, you sit on it and you get a dialog menu, with choices to eat, chat, slide chair in or out. However, once you have chosen an option after sitting, the dialog menu disappears and you can not get it back, i tried adding it to the Touch_start bu this has no effect. Can somebody help me out, my script is a bit 'rough' but it almost works. The goal is a seat you can sit on and then use dialog box to change animations, slide chair in and out, and then when you stand to lose dialog box. My script key gSitterId; integer gDIALOG_CHANNEL = -318; string gACTION_PROMPT = "What do you want to do?"; string gCurrentAnimation = ""; string displayName; integer chairPos; default { state_entry( ) { llSitTarget(<-0.32,0.0,0.3>,llEuler2Rot(<0,0,90>*DEG_TO_RAD)/llGetRot()); } touch_start(integer total_number) { llResetScript( ); llDialog( gSitterId, gACTION_PROMPT, [ "Eat", "Eat Slow", "Chat", "Slide In", "Slide Out" ], gDIALOG_CHANNEL ); } changed( integer change ) { gSitterId = llAvatarOnSitTarget( ); if( gSitterId != NULL_KEY ) { if( llGetPermissions( ) & PERMISSION_TRIGGER_ANIMATION ) { state sat_down; } else { llRequestPermissions (gSitterId, PERMISSION_TRIGGER_ANIMATION ); } } else { llResetScript( ); } } run_time_permissions (integer perm) { if ( perm & PERMISSION_TRIGGER_ANIMATION ) { state sat_down; } } on_rez( integer start_param ) { llResetScript( ); } } state sat_down { state_entry( ) { displayName = llGetDisplayName(gSitterId); llSetText("", < 1, 1, 1 >, 1 ); llListen( gDIALOG_CHANNEL, "", gSitterId, "" ); llDialog( gSitterId, gACTION_PROMPT, [ "Eat", "Eat Slow", "Chat", "Slide In", "Slide Out" ], gDIALOG_CHANNEL ); } listen( integer channel, string name, key id, string message ) { if( message == "Eat Slow" ) { llStartAnimation( "Sit at table 3" ); gCurrentAnimation = "sit at table 3"; llResetScript( ); llDialog( gSitterId, gACTION_PROMPT, [ "Eat", "Eat Slow", "Chat", "Slide In", "Slide Out" ], gDIALOG_CHANNEL ); } else if( message == "Eat" ) { llStartAnimation( "eating4" ); gCurrentAnimation = "eating4"; llResetScript( ); llDialog( gSitterId, gACTION_PROMPT, [ "Eat", "Eat Slow", "Chat", "Slide In", "Slide Out" ], gDIALOG_CHANNEL ); } else if( message == "Chat" ) { llStartAnimation( "Chat" ); gCurrentAnimation = "Chat"; } else if( message == "Slide In" ) { llSetPos(llGetPos() + <0,0.8,0>); llResetScript( ); } else if( message == "Slide Out" ) { llSetPos(llGetPos() + <0,-0.8,0>); llResetScript( ); } } changed( integer change ) { gSitterId = llAvatarOnSitTarget( ); if( gSitterId == NULL_KEY ) { llResetScript( ); } } on_rez( integer start_param ) { llResetScript( ); } } Thank you so much in advance Suzie
  7. All working , thank you everyone
  8. Hi Innula, it works! i didn't have all permissions on the broom... duh! thank you so much SQ
  9. Hi thanks thats really helpful, however, i think it's a bit beyond my capability right now, so will come back to it, when it makes more sense. thank you though the help is very much appreciated SQ I removed all the code from my floor prim and just lef thtis string displayName; integer iBroomChannel = -12169814;//change this for a long random intger of your choice string strCommand = "cleaning"; default { state_entry() { } collision_start(integer count) { key avatar = llDetectedKey(0); displayName = llGetDisplayName(avatar); llRegionSayTo(llDetectedKey(0),iBroomChannel, strCommand); llRequestPermissions (avatar, PERMISSION_TRIGGER_ANIMATION); } } But that just ask for permissions, i really cant get my head round this topic. maybe i will just leave the annoying ask boxes coming up after all
  10. Hi All, I am sure you are all very experienced, and mean to help, but some of us are not experienced at all, and are just finding our way. So please bare with us. This is the scenario. I have an AVATAR and they Have a BROOM attached to them, the BROOM has no scripts, no animations, no nothing. When the AVATAR collides with another PRIM on the floor, it has a script in it and also an animation, and this collision asks permission to animate the AVATAR, then the AVATAR animates and the script continues.... Are you saying the animation should be in the BROOM, and if so how please, this is all new to me, i have not looked at permissions etc before, so please "be gentle" Thank you
  11. Thanks Wulfie, i have looked around and can not see how i would do that, can you tell me how do i do that please?
  12. Hi, I have created 20+ chores within a household, and the person doing them has to have a certain item attached, and then they collide with a prim, and the chore starts, it has an animation as part of it, ie sweeping, or polishing etc. Can i make it so it does not ask every time for their permission to animate avatar, as its always the same people and when you clean a whole house being asked 20+ times can get annoying? Thank you
  13. ok thanks, I have managed to do it, using Lists
  14. Hi, Hi, I am trying to convert some code I have, so that I can use it in SL for a game I am making (still), but the code I use has an array Value( ) which I set value(nRemaining) = i + 1; But I can't seem to use an array in SL, how would I do this, as I need a value for value(1), value(2), value(3) etc etc so I can use later in script while (binary > 0) { if (binary % 2 == 1) { sum += value(whichTile); } binary /= 2; whichTile++; } validMove = (sum == diceTotal);
  15. Hi The spinning drum failed and it has been officially binned... so back to a 'simple' dice throw I have written the code for a dice... I am making the dice non physical, raising it 3 metres and then dropping it, (as you cant seem to throw a physical prim UP) when it finally stops I want to see what is face up, it tells me three times currently, I have tried using its relative height and all sorts, but if anyone has a dice rolling script or anything then I am happy to use that, as this has finally beaten me. All mi want to do is write the rest of the game...... yours, defeated and deflated Suzie rotation rot_xyzq; integer Dice1; default { touch_start(integer i) { llSetPrimitiveParams([PRIM_PHYSICS, FALSE]); vector xyz_angles = <0,45.0,45.0>; // This is to define a 1 degree change vector angles_in_radians = xyz_angles*DEG_TO_RAD; // Change to Radians rot_xyzq = llEuler2Rot(angles_in_radians); // Change to a Rotation llSetRot(llGetRot()*rot_xyzq); //Do llSetPos(llGetPos() + <0,0,3>); llSetPrimitiveParams([PRIM_PHYSICS, TRUE]); Dice1 = 0; } moving_end() { { vector vPosTest;vPosTest = llRot2Up( llGetRot() ); if (llFabs( vPosTest.z ) > 0.5) { if (vPosTest.z > 0) {Dice1 = 2;} else{Dice1 = 4;} } else { vPosTest = llRot2Left( llGetRot() ); if (llFabs( vPosTest.z ) > 0.5) { if (vPosTest.z > 0){Dice1 = 1;} else{Dice1 = 6;} } else { vPosTest = llRot2Fwd( llGetRot() ); if (vPosTest.z > 0){Dice1 = 5;} else{Dice1 = 3;} } } llOwnerSay((string)Dice1); } } }
  16. The code from Xijja did work, but wanted to look at the physical process too, as a different option thx
  17. Hi, ok I made a hollowed out cylinder prim, added this script and made it physical, it rolls , but all over the floor, I tried sticking a cylinder through it, or anything to keep it in place, but it just breaks free from anything, so how do I keep it in place and rotate? default { touch_start(integer total_number) { llTargetOmega(llRot2Left(llGetLocalRot()), PI, 1.0); llSetTimerEvent(5); } timer() { llTargetOmega(llRot2Up(llGetLocalRot()), 0, 1.0); } }
  18. I tied making it physical, but it moves all over the place....
  19. Wonderful, thank you, i can work with this, thanks so much Suzie
  20. Thank you all for your help on this, after many hours of trying and frustration I have come to the conclusion that i can not achieve the desired outcome. I have learnt a great deal though, and thank you all for your input. The game is going to the ever growing scrap heap, but the knowledge expands thanks Suzie
  21. Hello again, I am a little confused about rotation angles, can you help me? This is the simplified code for my trolling drum, which is lovely and smooth, and look great. integer speed; rotation rot_xyzq; default { state_entry() { llTargetOmega(llRot2Up(llGetLocalRot()), 0, 1.0); } touch_start(integer total_number) { speed = 4; do { llTargetOmega(llRot2Up(llGetLocalRot()), PI * speed, 1.0); // spin at speed llSleep(llFrand(3)); } while (--speed > 0); llTargetOmega(llRot2Up(llGetLocalRot()), 0, 1.0); //stop spinning //What is the Rotaton of the cylinder in DEGREES??? rot_xyzq = llGetLocalRot(); vector euler = llRot2Euler(rot_xyzq); euler *= RAD_TO_DEG; llOwnerSay((string)euler); } } However, the llOwnerSay((string)euler); returns <-90.00001, 0.00003, -150.00000> regardless of where the drum stops, i think you mentioned that it does not actually rotate, only for the viewer, but that's gone over my head, is there no way i can get the new position data when it stops? if i look at the properties for the prim, the X,Y and Z are changing each time... Thanks again Suzie
  22. Yes, but i have a limited space and don't want to be be using DIE() when dice get thrown around, and fancied having a tumbling wheel as part of the game, so its all very eat and compact.I do have dice i can throw and thanks to help get the face up values, but people do tend to thrown them away lol.
  23. Hi, Ok i have a complete code, that rotates a drum with 6 segments on the face of it (like a rolling dice) then slows ans stops and sets to one of the six posiitons. It's not over complicated and actually the way it jerks into position, is quite pleasant. Thank you to Love and Rolig for their input, and enabling me to make a rolling tumbler dice for my game. Much pleased, ta integer speed; rotation rot_xyzq; default { state_entry() { llTargetOmega(llRot2Up(llGetLocalRot()), 0, 1.0); } touch_start(integer total_number) { speed = 4; do { llTargetOmega(llRot2Up(llGetLocalRot()), PI * speed, 1.0); llSleep(llFrand(3)); } while (--speed > 0); llTargetOmega(llRot2Up(llGetLocalRot()), 0, 1.0); integer faceup = (integer)llFrand(6)*60; vector xyz_angles = <faceup,0,0>; vector angles_in_radians = xyz_angles*DEG_TO_RAD; rot_xyzq = llEuler2Rot(angles_in_radians); llSetLocalRot(llGetLocalRot()*rot_xyzq); //Just saying this out so i can check its working, will use as variable llOwnerSay((string)rot_xyzq.x); } } Thank you so much Suzie
  24. One more questionon this.... how do i know what the rotation is when it stops.... with LLlocal and llGet i could use something like rotation faceup = llGetLocalRot(); llOwnerSay((string)faceup.x; But that gives the same value for X, Y and Z wherever it stops.....? thanks, this has been most helpful, and another ticked box in my sl scripting.
  25. Hi All, Ok, i had a bit of a mess and this works, it may not be 'b the book' but it does the job integer speed; default { state_entry() { llTargetOmega(llRot2Up(llGetLocalRot()), 0, 1.0); } touch_start(integer total_number) { speed = 4; do { llTargetOmega(llRot2Up(llGetLocalRot()), PI * speed, 1.0); llSleep(3.0); } while (--speed > 0); llTargetOmega(llRot2Up(llGetLocalRot()), 0, 1.0); } } of course i will accept and 'tweaks'
×
×
  • Create New...