Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

18 Good

About testgenord1

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. Thank you very much, Qie Niangao. So, using the same position as the root prim's for the child prim automatically creates an offset for the child prim's position? Your advice seems to have done the trick. I'm posting the script below. Should I run into more problems, I'll come back again. Thank you all for your help very much again! πŸ™‚ default { state_entry() { vector startpos = llGetRootPosition();//Position of the rootprim llOwnerSay("startpos = " + (string)startpos); llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN,[PRIM_POSITION,<0,0,1>]
  2. Thank you very much for your idea. I've further simplified the script to avoid errors. The position of the childprim is now supposed ot be the same as the root prim's. Unfortunately it didn't help. (Renaming LINK_ALL_CHILDREN to link number "2" also didn't make any difference.) I tried some debugging and had a really bizarre result using the script below. The newly created vector of the linked prim ("newpos") produced the following result: [12:21] Primitive: startpos = <380.697083, 77.889473, 21.167229> [12:21] Primitive: newpos = <391.888062, 80.507759, 2
  3. Thank you for your quick reply. I just don't understand why, but it doesn't seem to make any difference (that's what I meant with "PRIM_POS" in my original post, I really meant to write "PRIM_POS_LOCAL". It leads to the same result. The script seems to be logical that way. I really can't see where the mistake is. Any other ideas will be appreciated.
  4. Hi! I would like to automatically set the position of a childprim on the same position as the root prim, but 1 meter above the root prim. This really should not be a problem, but for whatever reason, I cannot accomplish this. The childprim always ends up several meters set away from the root prim in the x-position. (The same also happens when I replace PRIM_POSITION with PRIM_POS.) I can't figure out what is wrong. Maybe you can find the mistake? Thank you very much in advance! Here is my script: vector startpos; default { state_entry() { startpos = ll
  5. Thank you so much, for your quick replies! Making the counter a global variable did the trick. I could have kept looking for hours without finding the solution. I learned a lot today. Thanks again! πŸ™‚
  6. Hi! I'm trying to build a linked prim which does the following: The linked prims are invisible, except for the root prim. There is a timer, once per second. Every second, one more childprim is supposed to become visible, i.e. first prim 2, then also 3, then also 4 etc., until all childprims are visible. I have a script that does this in one go (see below). However, I would like the childprims to become visible in a sequence, i.e. one more every second. I'm not even sure if this is possible. But maybe you have an idea. I'm posting my script below. Thank y
  7. Update: I've found the solution myself now. I forgot that the position from which the pieces are scattered out is not the start position of the particular piece, but the center of the puzzle "gamepos". So the updated version looks as follows now: float circle_radius = 5.0; float circle_height = -0.5; float position_angle = llFrand(TWO_PI); vector piece_position = gamepos + <circle_radius,0,circle_height> * llEuler2Rot(<0,0,position_angle>); float rotation_angle = llFrand(TWO_PI); rotation piece_rotation = llEule
  8. Thank you very much for your help! It's improved the situation significantly. To give one clarification first of all, the puzzle pieces are not linked to the puzzle root prim. Each piece is an unlinked prim and has the particular script in its inventory. This even simplifies the situation a bit, I think. However, it seems to make it harder to arrange the pieces in such a beautiful perfect circular shape, as in your screenshot. In my version, the pieces now really scatter randomly within the radius. This not a big problem since it already fulfills the requirements of the ran
  9. Thank you very much for your suggestions. I've tested both and they both work. The method using llRot2Fwd worked better than my original one, but still caused the division into to opposite piles. The other method, using a list containing the prim positions works more exactly. For whatever reason, it keeps placing some puzzle pieces in the exact same position as another piece, although none of the positions on the list are equal. Can you maybe see why this is the case? Thank you very much for your help anyway! πŸ™‚ list lpos=[ <0.0,5.0,0.1>,<1.0,5.0,0.1>,<2.0,5
  10. Hi! I've got a script of a jiggsaw puzzle. Before the puzzle can be played, the pieces are spread around from their initial position, which is the complete puzzle image. - They are supposed to be spread in a random fashion, so that the pieces are being mixed. - They are also supposed to be spread within a certain radius, so that all pieces always remain in the sight of the person playing. - The puzzle is then supposed to be assembled in the initial position again, which is in the center of the circle. The script I've come up with so far arranges the pieces in two loose piles
  11. Thank you, Mollymews! I'd made the same experience before, but couldn't make any sense of it. This explains it now, I guess. Thank you very much for taking your time and giving this helpful tip!πŸ™‚πŸ‘
  12. Hi again, and a Happy New Year to everyone, first of all!😎🍾πŸ₯‚ After experimenting a bit more, I've made an observation that I can't really make any sense of: The problem with the timer described above went away when I arranged the timer and listener event in the same order as the llSetTimer and llListen commands before (s. script excerpt below). I can't quite understand why the order of the events in the script should make any difference. Do you maybe have an idea? Thank you! ... default { touch_start (integer num) { llSetTimerEvent(1.0); //first: llSetTi
  13. Thank you very much for your quick and detailed reply!☺️ I wouldn't have come up with these ideas on my own. This explains everything to me at this point. Again, thank you very much.πŸ‘πŸ™‚
  14. Hi! I've got a script that is supposed to play a random sound out of 4 sound files in the inventory of the prim. This means that whenever the script is started, any of the 4 sounds is supposed to be played by a random choice. I've used llFrand to create a "random" choice for this. Here is the part of the script: isound = (integer)llFrand(4.0); llPlaySound(llGetInventoryName(INVENTORY_SOUND,isound),1.0); There are three things I couldn't quite figure out. 1. The float in llFrand is in the range between 0 and the maximum number (given in the brackets). Is the first sound in
  15. //https://community.secondlife.com/forums/topic/444235-quiz-using-dialog-menu/ integer gListen; integer time = 180; integer ttime; integer seconds; integer points; key player; string nameplayer; integer gameover; integer CHANNEL = -886; integer index; string answer; integer channelgerman = -1291; string quizname; integer iAnswered; list lSounds = [ "6e517cde-066f-455e-8c6b-f1c33be90dea", "611c9470-507e-4471-8ce2-5ed0962e4c85", "b1e78aa1-52b7-482f-a48a-57e3ddff81fc", "7b978d05-b3bd-4e6f-892f-92dc4845ddd8", "64319812-dab1-4e89-b1ca-5fc937b8d94a", "720ff3dd-8fc6-4523-9670-139df57527f3"]; list q
  • Create New...