Sunbleached Posted June 8, 2019 Share Posted June 8, 2019 (edited) Hello! I want to create a teleport effect script. you know such an attached particle emitter is triggered when you teleport the avatar to a new place. I do not know from what event to start it. is it also possible to make it not work when simcrossing? Edited June 8, 2019 by Sunbleached Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 8, 2019 Share Posted June 8, 2019 17 minutes ago, Sunbleached said: I do not know from what event to start it. changed (integer change) { if (change & CHANGED_TELEPORT) { //make an effect } } 19 minutes ago, Sunbleached said: is it also possible to make it not work when simcrossing? Yes 1 Link to comment Share on other sites More sharing options...
Kardargo Adamczyk Posted June 8, 2019 Share Posted June 8, 2019 (edited) You are looking for the changed event, default { changed(integer change) { if (change & CHANGED_TELEPORT) { llOwnerSay("The object has been teleported while attached."); } } } as far as i know sim region crossing does not trigger this event. Edited June 8, 2019 by Kardargo Adamczyk 1 Link to comment Share on other sites More sharing options...
Fritigern Gothly Posted June 8, 2019 Share Posted June 8, 2019 37 minutes ago, Kardargo Adamczyk said: You are looking for the changed event, default { changed(integer change) { if (change & CHANGED_TELEPORT) { llOwnerSay("The object has been teleported while attached."); } } } as far as i know sim crossing does not trigger this event. The trigger for region (not sim) crossings is CHANGED_REGION 1 Link to comment Share on other sites More sharing options...
SeanMcDonald Posted June 8, 2019 Share Posted June 8, 2019 2 hours ago, Fritigern Gothly said: The trigger for region (not sim) crossings is CHANGED_REGION Aren't "region" and "sim" synonyms? 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 8, 2019 Share Posted June 8, 2019 (edited) No, although it's almost pedantic to point it out since people tend to act as if they are. Take a look at http://wiki.secondlife.com/wiki/Sim, where you will get Linden Lab's own definition of sim and will see the comment " In common usage, "sim" may also be used to mean region, though this meaning is deprecated because it is ambiguous. Most accurately, a region is simulated by a sim process running on a sim node." EDIT: If you ever find yourself talking with a Linden, it's probably wise to use the terms carefully Edited June 8, 2019 by Rolig Loon 4 Link to comment Share on other sites More sharing options...
Fritigern Gothly Posted June 8, 2019 Share Posted June 8, 2019 (edited) 14 minutes ago, SeanMcDonald said: Aren't "region" and "sim" synonyms? A region is a 256mx256m area of virtual land in SecondLife. A sim (short for simulator) is the software that runs on the servers, this software simulates the regions. Each simulator contains several regions. I once heard that there are 4 regions per sim, but I am not sure if that number is correct (anymore). EDIT: I see that Rolig beat me to it. Only using different wordings. Edited June 8, 2019 by Fritigern Gothly 4 Link to comment Share on other sites More sharing options...
Sunbleached Posted June 8, 2019 Author Share Posted June 8, 2019 (edited) @Rolig Loon@Kardargo Adamczyk@Fritigern Gothly In general, I have a problem. I would like to use three systems of particles in one script that work one after another with a small interval of 0.1 second. I used llSleep(0.1) as you can see, but only the first particle system works for me. where did I go wrong? Can it be a matter of the particle systems themselves? default { changed (integer change) { if (change & CHANGED_TELEPORT) { llParticleSystem([PSYS_PART_MAX_AGE,3.00, PSYS_PART_FLAGS, 259, PSYS_PART_START_COLOR, <0.80900, 0.61643, 0.19086>, PSYS_PART_END_COLOR, <0.95090, 0.23954, 0.04910>, PSYS_PART_START_SCALE,<0.80000, 0.22108, 0.00000>, PSYS_PART_END_SCALE,<0.85180, 0.90234, 0.00000>, PSYS_SRC_PATTERN, 8, PSYS_SRC_BURST_RATE,0.00, PSYS_SRC_BURST_PART_COUNT,6, PSYS_SRC_BURST_RADIUS,2.21, PSYS_SRC_BURST_SPEED_MIN,0.00, PSYS_SRC_BURST_SPEED_MAX,0.00, PSYS_SRC_ANGLE_BEGIN, 1.35, PSYS_SRC_ANGLE_END, 1.35, PSYS_SRC_MAX_AGE, 0.0, PSYS_SRC_TEXTURE, "2faccae0-e52c-d886-c210-39d680328584", PSYS_PART_START_ALPHA, 0.61, PSYS_PART_END_ALPHA, 0.05, PSYS_SRC_ACCEL, <0.00, 0.00, 0.20>, PSYS_PART_START_GLOW, 0.10, PSYS_PART_END_GLOW, 0.00]); llSleep(0.1); llParticleSystem([PSYS_PART_MAX_AGE,3.13, PSYS_PART_FLAGS, 259, PSYS_PART_START_COLOR, <0.30855, 0.28689, 0.26782>, PSYS_PART_END_COLOR, <0.66024, 0.68310, 0.63490>, PSYS_PART_START_SCALE,<0.00000, 0.00000, 0.00000>, PSYS_PART_END_SCALE,<2.00000, 2.00000, 0.00000>, PSYS_SRC_PATTERN, 2, PSYS_SRC_BURST_RATE,0.05, PSYS_SRC_BURST_PART_COUNT,5, PSYS_SRC_BURST_RADIUS,0.00, PSYS_SRC_BURST_SPEED_MIN,0.55, PSYS_SRC_BURST_SPEED_MAX,0.60, PSYS_SRC_ANGLE_BEGIN, 0.53, PSYS_SRC_ANGLE_END, 0.30, PSYS_SRC_MAX_AGE, 0.0, PSYS_SRC_TEXTURE, "73737ea6-143d-50cb-5afd-2d15bd9d901e", PSYS_PART_START_ALPHA, 1.00, PSYS_PART_END_ALPHA, 0.00, PSYS_SRC_ACCEL, <0.00, 0.00, 1.07>]); llSleep(0.1); llParticleSystem([PSYS_PART_MAX_AGE,4.48, PSYS_PART_FLAGS, 263, PSYS_PART_START_COLOR, <0.97466, 0.94959, 0.10151>, PSYS_PART_END_COLOR, <0.15569, 0.77671, 0.02538>, PSYS_PART_START_SCALE,<1.33333, 1.32886, 0.00000>, PSYS_PART_END_SCALE,<0.00000, 0.00000, 0.00000>, PSYS_SRC_PATTERN, 2, PSYS_SRC_BURST_RATE,1.64, PSYS_SRC_BURST_PART_COUNT,5, PSYS_SRC_BURST_RADIUS,0.65, PSYS_SRC_BURST_SPEED_MIN,0.25, PSYS_SRC_BURST_SPEED_MAX,0.38, PSYS_SRC_ANGLE_BEGIN, 0.00, PSYS_SRC_ANGLE_END, 0.00, PSYS_SRC_MAX_AGE, 0.0, PSYS_SRC_TEXTURE, "fe054e23-14c3-23cd-a06b-ccaf97c42ea5", PSYS_PART_START_ALPHA, 1.00, PSYS_PART_END_ALPHA, 0.00, PSYS_SRC_ACCEL, <-0.02, -0.05, 0.00>, PSYS_SRC_OMEGA, <-0.01, 0.00, 0.00>, PSYS_PART_START_GLOW, 0.50, PSYS_PART_END_GLOW, 0.00]); llSleep(0.1); llParticleSystem([]); //make an effect } } } Edited June 8, 2019 by Sunbleached Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 8, 2019 Share Posted June 8, 2019 I'm surprised that you see the first set at all. I would have expected you to only see the last one. Those itty bitty llSleep steps don't give the system any time to even start one set of effects before the next one is called. If you ever see the first two, I will be surprised. Now, if you increase the llSleep to a few seconds and then deliberately stop one set of particles before you start the next one, you might have something. Probably not much, because it still takes time for the particle textures to rez, but you might have something. 1 Link to comment Share on other sites More sharing options...
Coffee Pancake Posted June 8, 2019 Share Posted June 8, 2019 2 hours ago, Fritigern Gothly said: I once heard that there are 4 regions per sim, but I am not sure if that number is correct (anymore). That was true way back in the dark ages when LL would proudly announce new hardware specs for their data centre. They did say at some point they were moving to class-less servers, so now we have no clue what they have. Although it is fairly realistic to assume all of the hardware we were told about has long since been retired, ended up on ebay, donated to a thrift store and is now humming away in someones basement with no idea of the magic it once contained. Although if they do have them propping open a door, they could do something like this (sans disk drives, obviously), fairly sure we would buy them for a better than raw hardware price. 1 1 Link to comment Share on other sites More sharing options...
Sunbleached Posted June 12, 2019 Author Share Posted June 12, 2019 (edited) @Rolig Loon in continuation of this topic. I would like to add a pose that works at a certain moment. I have such a script, could you help to embed it please? Does this script fits for it at all? string anim = "Your_Animation"; integer attached = FALSE; integer permissions = FALSE; default { state_entry() { llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); } run_time_permissions(integer permissions) { if (permissions > 0) { llStartAnimation(anim); attached = TRUE; permissions = TRUE; } } attach(key attachedAgent) { if (attachedAgent != NULL_KEY) { attached = TRUE; if (!permissions) { llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); } } else { attached = FALSE; llStopAnimation(anim); } } } Edited June 12, 2019 by Sunbleached Link to comment Share on other sites More sharing options...
Mollymews Posted June 12, 2019 Share Posted June 12, 2019 @Sunbleached you might want to spend a little more time looking at the example code on the wiki. Like its sound coding practice to test for the specific permission rather than any permission as you have. The wiki example code given for llStartAnimation shows how to do this: http://wiki.secondlife.com/wiki/LlStartAnimation other things you want to be mindful of is that you have a global variable: "integer attached". As wrote this has no functional purpose in the script, and if it were to have a purpose then it won't value correctly in all cases. As wrote 'integer attached' will be set TRUE when the script is reset, which can be done when the object is rezzed on the ground and not attached 1 Link to comment Share on other sites More sharing options...
Sunbleached Posted June 12, 2019 Author Share Posted June 12, 2019 (edited) 3 hours ago, Mollymews said: @Sunbleached you might want to spend a little more time looking at the example code on the wiki. Like its sound coding practice to test for the specific permission rather than any permission as you have. The wiki example code given for llStartAnimation shows how to do this: http://wiki.secondlife.com/wiki/LlStartAnimation other things you want to be mindful of is that you have a global variable: "integer attached". As wrote this has no functional purpose in the script, and if it were to have a purpose then it won't value correctly in all cases. As wrote 'integer attached' will be set TRUE when the script is reset, which can be done when the object is rezzed on the ground and not attached Hi! Thanks very much for example! Here is what I got now. But one part is not very clear. Should I or shouldnt use llSetTimerEvent(0.0); ? Because when I use it it never stops animation. So i commented it and it works. Why this may happen? In general is my script correct? { // llSetTimerEvent(0.0); llStopAnimation("sit"); } The script: default { state_entry() { llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); } run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { llOwnerSay("animation will end in 10 seconds"); llSetTimerEvent(10.0); } } changed(integer change) { if (change & CHANGED_TELEPORT) { llOwnerSay("TELEPORT"); llStartAnimation("sit");//EXAMPLE ANIMATION } } timer() { // llSetTimerEvent(0.0); //THIS PART NOT CLEAR! llStopAnimation("sit"); } } And if object rezzed on ground it gives me an error every 10 sec. Is it supposed to be? Edited June 12, 2019 by Sunbleached Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 12, 2019 Share Posted June 12, 2019 Once again, follow previous advice and add llOwnerSay diagnostic statements at a few places and track what's actually happening. You'll see what's wrong fairly soon. Scripting is about logic. Having someone else find your errors is nowhere near as helpful as finding them yourself. 1 Link to comment Share on other sites More sharing options...
Sunbleached Posted June 12, 2019 Author Share Posted June 12, 2019 41 minutes ago, Rolig Loon said: Once again, follow previous advice and add llOwnerSay diagnostic statements at a few places and track what's actually happening. You'll see what's wrong fairly soon. Scripting is about logic. Having someone else find your errors is nowhere near as helpful as finding them yourself. Thank you very much, I do not see an error at this stage. everything works as it should. and the error given by the script was often met by me in other cases when, for example, the animation was incorrectly named or the object was rezzed on the ground and not worn as it should be. so I think it is not critical. Link to comment Share on other sites More sharing options...
Mollymews Posted June 13, 2019 Share Posted June 13, 2019 8 hours ago, Sunbleached said: And if object rezzed on ground it gives me an error every 10 sec. Is it supposed to be? it is supposed to be, because that's what you typed into the script what you typed may not be what you wanted to happen, but it did happen which is what is supposed to be i understand that you are a enthusiastic bubbly person and wanting script solutions. But !!! some advice. You do need to starting listening more closely. and do what you should be listening too. And stop saying stuff on here that makes scripters want to go all Mr Krabs on you 😸 saying stuff like: "error .... the object was rezzed on the ground and not worn as it should be. so I think it is not critical." If you are ever going to be a capable scripter then every error caused as a result of your own coding, is critical and listen to Rolig and the others when they tell you to debug your code by putting llSay() feedbacks in your script. When you do this, and focus on the logic flow of your script then you will see when the llSetTimerEvent() in your latest above is fired, which is wrong for this purpose. And see where it should be fired but doesn't i could easily tell you the answer and so could everyone else on here. But the total answer is to pretty much rewrite the whole script. So start sticking llSay() debugs into your scripts please. When you don't do this then you are guessing what is happening when the script runs. Guessing is not the path you want to be on 1 1 Link to comment Share on other sites More sharing options...
Sunbleached Posted June 25, 2019 Author Share Posted June 25, 2019 @Mollymews@Rolig Loon And still what is wrong with this script? When i use it - it works fine, but when another avatar - it gives an error! This is the latest version of the script. I skipped particle systems to make it shorter. Any help please! default { state_entry() { llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); } run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { llOwnerSay("animation will end in 10 seconds"); llSetTimerEvent(7.0); } } changed (integer change) { if (change & CHANGED_TELEPORT) { llStartAnimation("Maleficent"); llParticleSystem([///skipped]); llSleep(6); llParticleSystem([///skipped]); llSleep(1); llTriggerSound ("thunder", 1); llParticleSystem([///skipped]); llSleep(2); llParticleSystem([///skipped]); llSleep(1); llParticleSystem([]); } } timer() { // llSetTimerEvent(0.0); llStopAnimation("Maleficent"); } } Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 25, 2019 Share Posted June 25, 2019 Well, for starters, you told the script in the state_entry event that you wanted it to ask the owner for permissions. If you are still the owner, nobody else can use the device. I suggest restarting the script on CHANGED_OWNER 1 1 Link to comment Share on other sites More sharing options...
Sunbleached Posted June 26, 2019 Author Share Posted June 26, 2019 11 hours ago, Rolig Loon said: Well, for starters, you told the script in the state_entry event that you wanted it to ask the owner for permissions. If you are still the owner, nobody else can use the device. I suggest restarting the script on CHANGED_OWNER Thank you so much! I added this lines before CHANGED_TELEPORT and now it works perfectly! changed (integer change) { if (change & CHANGED_OWNER) { llResetScript(); } if (change & CHANGED_TELEPORT) 2 Link to comment Share on other sites More sharing options...
animats Posted June 27, 2019 Share Posted June 27, 2019 SL16B's arrival point has a teleport map which attaches a temporary attachment to your avatar, an attachment with a particle emitter and sound. Bad idea. I used the teleport map to get to Ebbe's talk, and in the overloaded sim, the particle emitter wouldn't finish and detach. So I was stuck there in a purple cloud for over a minute. Got nasty messages in chat. I finally had to log out. 1 Link to comment Share on other sites More sharing options...
Mollymews Posted June 27, 2019 Share Posted June 27, 2019 once upon a time, if you teleported in anywhere without a massive particle poofer display, and without a battery of floodlights that lit up everything in sight, and without a sonic boom, and without a multi-character gesture shout announcing your arrival !!! then people would IM you wondering what was wrong with, like you got sneaky in tippy toes disease or something sounds like Whoever Mole that provided the teleport poofer got all nostalgic for the once upon a time days 😸 2 Link to comment Share on other sites More sharing options...
Nova Convair Posted June 27, 2019 Share Posted June 27, 2019 I don't see/hear attached lights (facelights) / particles / sound (gestures) so I didn't see or hear any annoying things for years now. So just plaster yourself with that stuff - I'll never know. 😁 It shows that the Mole that made the hud's has no clue of SL though. Every experienced SL'er knows what to do not in overloaded laggy sims. 😎 @Sunbleachedit's good to know when and under what conditions an event fires. http://wiki.secondlife.com/wiki/Category:LSL_Events 1 1 Link to comment Share on other sites More sharing options...
Sunbleached Posted June 27, 2019 Author Share Posted June 27, 2019 2 hours ago, Nova Convair said: 😁 😎 @Sunbleachedit's good to know when and under what conditions an event fires. http://wiki.secondlife.com/wiki/Category:LSL_Events Hello! Thanks for the link! I really did not know that there are 39! events! I do not know how much this relates to the topic, but here is the question. Sometimes some changes in the script do not take effect until i manually reset the script, sometimes even this does not save and i have to rez the object to the ground, reset the script and take the object to wear it again. I think i just need to add a reset script, a mystery is why it happens and in which place to insert it? For example, if it is a typer effects script (animations, particles, sounds). Link to comment Share on other sites More sharing options...
Nova Convair Posted June 27, 2019 Share Posted June 27, 2019 The state_entry event triggers only once - the 1st time the object is rezzed or worn. If you need it again you can reset the script to do so. On the other hand attachments/huds often use the attach event. That is not triggered by a reset. So you see if you have multiple events in use - things need to be thought through sometimes. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now