Jump to content

Estelle Pienaar

Resident
  • Posts

    143
  • Joined

  • Last visited

Everything posted by Estelle Pienaar

  1. This is probably a noob question. How do I make a HUD give a welcome to the avatar when he/she logs back in and the avatar is already wearing the HUD from the last session?
  2. I think the reason why you are not getting any responses is that you are asking too many different questions in one post. Ask one single question which is as specific as possible. Do you want to find out how to create couple poses? How to create poseballs? How to create a vehicle? How to rez an object (and pose balls) when a HUD is clicked clicked? You seem to ask for everything and nothing.
  3. Wait, there are scripts for can't rez only wear? How does that work?
  4. There is a comprehensive book that gives a good introduction to LSL scripting. I have learned the basics with it: 'Scripting Your World, The Official Guide to Second Life Scripting'. You can read the first chapter for free here. It will give you an impression what to expect of the book. Even if there are some new features and functions of LSL that are not in the book (I think it's from 2011), it still gives a good introduction and you'll be able to learn the new features with the LSL wiki later on. For me personally the book has been one of the best investments of my life. :matte-motes-nerdy:
  5. Make access to a parcel in the region "group only". Then place the object there?
  6. EDITED You should first look up what global variables are. In LSL a local variable stores information temporally (for the duration of the event) while a global variable stores information permanently. If you are using a local variable, then each time the event happens (in this example with each listening event) the variable is called from scratch and has ONLY the value that you give it at this moment. It loses all information it was containing before. A global variable does start the computation process with the results that it already includes. You need to define them (including the list) before the state default. In case that this is also unclear: Then you should look up in the lsl wiki on how to add elements to a list. There are several ways to do so. Good luck!
  7. For the sake of being complete with the list of possible solutions, I would like to point to another way of getting arround the parsing that came to my mind. If llHTTPRequest is used with the method GET instead of POST (= posting the information in an html document body instead in an URL) then much longer strings can be transmitted = no need to typecast anything. Downside: The method POST needs more complex PHP scripts = headaches.
  8. Sounds promising, but I need to learn that. I shall reach these higher realms of scripting one day... :matte-motes-big-grin-wink:
  9. I do have an sql server anyway and I thought it would be neat to use it. I have not tested Experience Tools before but maybe it's a good moment to start looking into it. Thanks for the advice!
  10. Like I said in my last post: The loop in order to change from string to list has to be done only once. Afterwards, in the game itself, the engine is (right now) based on lists. And there are triggers for events all the time, and these events should be efficiently scripted, right? The string/list does not only contain the events, but also conditions. A trigger can result in several game events that might already have been played etc. and everything needs to be looked up in the string/list and it needs to be modified. There are many functions going on based on the list all the time. So it is not one single llGetSubString() vs. one single list operation. It means changing the list/string itself all the time. You would e.g. need to break up and merge the string with a new value at different positions all the time. It can probably be done more efficient with llListFindList and llListReplaceList. Maybe there is no difference in efficiciency but I think there is.
  11. Yes I could do that. Yes I should do that. Thanks for pointing me to the obvious solution. Or to say it with Homer Simpson: :matte-motes-oh-rly:  EDIT: Or let's say I will look into it when I have time. After all, the loop-parsing from string to a list only takes place once when the HUD is attached and is therefore not as resource demanding (as I originally feared). Changing the calculation process from list-based to string-based means rewriting the core game engine from scratch and I got other things on my plate right now... EDIT 2: It is possible that having to operate with substrings every time that an event happens is more resource demanding than parsing a list once and then always checking the list. I would need to test that too. Anyway, thank you very much for all your feedback and ideas. It's much appreciated.
  12. Thanks for the proposal! I will test it later and change my script accordingly.
  13. It will all be good. I realized that the HUD only needs to perform the operation once, when it is attached.So it will be no lag disaster... ;-) About the logic and because I made you wondering: The script does download the game progress from the server when the HUD is attachedd. There are 200 non-linear game events that can be non-completed (=0) or not completed (=1). Yesterday I realised that the URL lenght for LSL-PHP-SQL communication is restricted. I is not long enough to communicate the player key and 400 characters of list content +commas. So for transmitting it to the server, I convert the list into a string without commas which is easy and fast in LSL. When receiving info from the server, it needs to be converted back into the list which is obviously more complicated. Last but not least you might say: "Wait there is not only 0 and 1, but also a 9 in your string." These numbers are leftovers from my tests with PHP where it would cut the string. It's easier to spot than counting all the zeros.
  14. I am a bit tired today and might be missing something obvious. I couldn't find any easy way to parse each single character of a string as an item of a list. The string is made up of 201 characters. I have written a small script that does it, but it seems to take +/- 0.8 seconds which is quite long. My script will have to call that function quite often and there might be several people on the sim, using the HUD simultaniously. Does anyone have an idea how to do this with less resources? Maybe there is a way to apply llParseString2List that I have overlooked? default { state_entry() { llOwnerSay(llGetTimestamp()); string my_string = "100000000000000000000000000000000000000090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009"; integer length = llStringLength(my_string); integer w; list newList; for(w = 0; w < length; w++) { newList += [llGetSubString(my_string, w, w)]; } llOwnerSay(llGetTimestamp()); llOwnersay(llCSV2List(newList); } }
  15. steph, in my eyes it is relevant to some long term SL scripters what scripting language a possible SL successor might use. There have been 18 answers so far, but yeah, you decide what's relevant. Sure! Also you were the one talking about appearence restrictions in Sansar as if it is a given fact. I have corrected you based on some older reports from discussions from the Lindens. But yeah, you decide who is making opinions from a vacuum. Sure!
  16. We are off topic now but I think you are seeing experience restrictions to negative. It's an option for experience creators, not a must. There will be countless experiences where you can go as you like and some where you have to chose a predifined avatar. If that's a no-go for you then avoid these experiences and go to others that let you all the freedom you need. I think that it is a good thing to give people options. And it can be an option to reduce freedom of individual expression for the sake of a more realistic experience. I don't see a problem in it. The same goes for human avatars. Maybe it's in the current developing stage only possible to be a humanoid avatar, but it's a very early stage. I would bet money that later on there will be even more possibilities for avatar forms than in SL.
  17. Thanks for the feedback! I am already a bit calmer then before. I guess, I didn't stick to the rule to not panik before there is actual reason.
  18. Today I wanted to inform myself today about the scripting language that Linden Lab foresees for Project Sansar: C#. I stumbled over a reddit post for another game with user created content, called 'Kerbal Space Programme' (link at the end of this post). Here are some of the comments of informed users (people who know programming and scripting languages) about the proposal to use C# as the language for user content creation in 'Kerbal Space Programme': "C# = high learning curve and high complexity cost to the user." "Please don't make us script in an application development language." "C# is going to alienate quite a load of the intended audience. I don't think that'd be a positive move for the developers." "Really, I can't see C# being even slightly feasible as an in-game programming language in the game (EDIT: in terms of people being willing to learn it). You're going to be left with only career programmers." "C# as a scripting language for ingame scripting is insane." There are also other commenter who are supporting C#, but they seem to be mostly professional programmers. I am wondering why such a discussion hasn't taken place in regards to Sansar? Do people not care? Has LL made so many bad decisions in regards to Sansar, that this will not make a difference anyway? What do you think? Here is the link to the KSP reddit discussion on C#: https://www.reddit.com/r/spaceengineers/comments/28j9qn/dear_devs_c_is_not_a_scripting_language_please/
  19. Actually, I have not come up with one other good use case for a state change. This is the only one I ever found and it is bugged... Great work LL!
  20. touch_ start triggers when you press the mousbutton down. touch_end triggers when your finger lifts up from the mouse button. Unless a player needs 1 second for the click instead of the usual 10 milliseconds, the delay is barely noticeable. (It might make a difference for shooter games, but there I probably won't need a state change.) If touch_start would work better (it really doesn't work well in my scripts with state change), then I would prefer it to touch_end. PS: I am now wondering if my problems with touch_start might originate in my lazyness to never check the condition if (touch_id == 0) I shall test this one day...
  21. Yingzi did a great explanation when I asked a few Months back. Scroll to the bottom of the post: https://community.secondlife.com/t5/LSL-Scripting/User-defined-functions-for-dummies/td-p/2805242
  22. Another option is to work with two states. After the object has been touched the script switches into a state that has no touch_start event. Then start a timer. After 5 seconds you switch back to the default state. This method has the adventage that the object is not "touchable" during the 5 second period and people won't think that it's lag or a script with a malfunction. EDIT: Remark 1: Never use touch_start. It's kind of broken. I always use touch_end. Especially touch_start in relation with a state change will have side effects (e.g. object needs to be clicked several times before anything happens). Remark 2: I have rarely seen crashed scripts in-world. However the few crashed scripts that I have seen stopped working due to simultaneous touches while it was still calculating. The above method to change the state after a touch can help limiting the risk for a crash if there is high traffic.
  23. Wow Madelaine and Rollig, you are both fantastic! Thank you so much for these explanations which are so helpful. I really appreciate the time and effort that you have put in your posts. :heart:
  24. Thanks a lot Rollig. I cannot say that I have fully understand it after my first reading of your text, but I am very confident that it will enable me to fully understand the principle when I meditate a bit on it. :matte-motes-big-grin:
×
×
  • Create New...