Jump to content

Dourden Blindside

Resident
  • Posts

    6
  • Joined

  • Last visited

Reputation

2 Neutral

Recent Profile Visitors

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

  1. True, but how can i wait until the event is handled ? I can't continue my code without that data.
  2. Hello all, In the below code I'm requesting Display Name. Unfortunately i really can't figure out how to have displayName1 show a value. I understand that llOwnerSay("DisplayName1") happens before the handler is consumed, but how can i make my code wait until all the event calls are finished ? I tried a do_while but that just broke my code into an infinite loop. string displayName; default { state_entry() { llRequestDisplayName(llGetOwner()); llOwnerSay("DisplayName1 "+ displayName); } dataserver(key queryid, string data) { displayName = data; llOwnerSay("DisplayName2" + displayName ); } } Thank you, David
  3. Thank you everyone. I just finished my first "slightly complex" script. Looks good and I tried followed your advices. Now I'm gonna start testing it and probably I will start to understand what states mean: "denial, depression, acceptance, bargaining" etc.
  4. Hi all, First of all thank you for the numerous responses. I am still reading the replies the 100th time . Functions I see here a lot of thumbs up for functions. Ok, i will beat my brain around this and try to follow an organized style with it. I like the organization of @LoneWolfiNTj Multiple Scripts All i want is to keep my code clean, reusable and scalable. I thought that if i leverege llMessageLink i could create general/scalable scripts that i would later on reuse. Yes i can copy paste the code, but...doesn't feel the same. I don't want my scripts to run forever, i would kill them as soon as their purpose has been served. States Honestly, i thought that states are the flow logic of my code. The rest are events. Maybe I'm wrong, maybe i didn't understand the purpose of states. I thought it was similar to methods in OOP .No ? External Editors Painful subject, hurt my fingers trying to get eclipse to work with LSLForge. As soon as i did that, i found out that LLRequestUserKey is not working. I cried so much. @Coffee Pancake how do you use VS with LSL ? I didn't know there's a plugin for that...or what am i missing. I thought the only editors that kinda work are LSL Forge with Eclipse and LSLEditor. Conclusion Guess the more i'll code the more i'll understand your opinions. So far scripts i read are usually just a sequence of event handlers without anything semantic in it. Again, THANK YOU!
  5. Hi everyone, I'm new to scripting and i would like to ask a question about how to organize code. Personally i dislike a high number of global vars or having one event that handles multiple operations (like dataserver), so im thinking to use multiple scripts that do small pieces of code. I know the first reply would be that idle scripts consume memory, but do they still consume memory if i stop them (llSetScriptState)? For example, have one script to return avatar key, another to return avatar profile picture, etc. They all send messages to my mains script which then stops the other scripts. Is this approach still bad from a performance/memory consumption point of view ? I also looked into organizing my code based on states like: - state "get_ava_key"; state "get_ava_profile_pic", etc but...it still forces me to use global vars...like query id...and i personally dislike that. Also i loose the parallel processing of using multiple scripts... What is your opinion? Thank you, David.
×
×
  • Create New...