Jump to content

Ichi Rexen

Resident
  • Posts

    47
  • Joined

  • Last visited

Everything posted by Ichi Rexen

  1. http://wiki.secondlife.com/wiki/LSL_Operators And I quote ! ~ ++ -- logical NOT, bitwise NOT, increment, decrement
  2. This conversation wasn't specifically aimed at beginners, although they are welcome to join it. It was more for those with more experience to discuss the pros, cons, usefulness of states. But, in terms of how I switched the variable in the code example there is nothing to stop a learner posting in this chat and asking "Hey what does that mean, I have never seen it before" and then someone else responding "In programming the ! symbol is called Logical NOT and you use it like that to switch a variable between 1 and 0, to learn more -insert wiki link here-". Part of learning to code is asking questions, seeing and learning new things from what you have seen that you might not otherwise have known about and then playing with those things to see what results may emerge.
  3. Interesting response. Iv never actually used them to flush the event buffer although thats a pretty neat way to do it thinking about it.It would save in having to write out multiple listen removes to clear out listeners, I will happily accept that as one valid use for states. I do feel there might be another way to do your link set example. Your other examples are interesting though. I had a similar problem a long time ago where I had an object scanning a link set and linking up names with link numbers. Mainly so I didn't have to continuously link things in a specific order. The way I got around the issue of it not finding specific links that it should was to set a bool to FALSE and then return on any further processes with an error message and await a touch user input that could only be activated after this bool was set to FALSE to reset and try again. Your method is interesting though and I will also take that as a valid use of states in this situation.
  4. 1. I stated that memory counts are not always reliable because of different things the script might be doing / have in it etc etc. 2. Given that one script is using a state and the other a bool and yet there is a clear difference between the two in memory usage, if we use the values given then surely the free memory function must be taking more than just its default state into account because otherwise the use count in the bool script would be higher than in the state script as there is more going on in the default state in the bool script than in the state script. There for it seems logical to deduce that the bool script is taking up less memory than the state script. 3. I am more than aware that a states are their own individual separate contained, lets call them "sections of code", that have their own separate contained events etc etc. But, if you feel that I do not understand states in the way that you do then perhaps add to the discussion and explain them. Theres no need to come across so hostile at the end.
  5. 61652 - 61148 = 504 bytes I ask again, for the purposes of an interesting discussion. Can you provide examples of where states are more useful than other methods to achieve the same ends?. You say containment, okay can you give an example. What in your opinion is a use for states that cant better be achieved by other methods?.
  6. What in your opinion is their specific usage. Can you give an example of where a state is superior to other methods?. Thats a typo, I corrected it. I know how much memory a script has. Thank you for pointing it out though
  7. So, lets have a random debate or conversation, whatever you want to call it. The title is "States and are they REALLY worth using". My personal stance on this is that while some may feel that states have their place I do not see any point in using a state when there are other methods to achieve the same ends and usually end up coming in at a lower script memory cost. And I have yet to find a problem to solve that can't be fixed by say using booleans to manage the different operations of your script as opposed to constantly switching back and forth between 2, 3, 4 different states. I also find the use of states to be cluttered and usually resulting in much unnecessary code. Let's start with a very basic example, a script that outputs text telling us if a door is open or closed. Using states we have : default{ state_entry(){ llOwnerSay("States : "+(string)llGetFreeMemory()); } touch_start(integer x){ llOwnerSay("The door is now open"); state open; } } state open{ touch_start(integer x){ llOwnerSay("The door is now closed"); state default; } } This has a free memory count of : 61148 Using bools we have : integer dSwitch=FALSE; default{ state_entry(){ llOwnerSay("Bools : "+(string)llGetFreeMemory()); } touch_start(integer x){ if(dSwitch){ llOwnerSay("The door is now closed"); }else{ llOwnerSay("The door is now open"); } dSwitch=!dSwitch; } } This has a free memory count of : 61652 We can see here that there is a saving of roughly 500b by using bools instead of using states. Now, before you jump on it, I am more than aware that memory count in a script is subject to many different things that are going on in the script and can change frequently depending on what the script is actually doing. However in this example I feel it gives a good indication of the potential difference in script memory cost between the two methods. I am also aware that this is a very basic example and I specifically chose a basic example to start the conversation with the intention that I or others may want to add more advanced examples as the conversation progresses, if it progresses at all, no one might comment in which case boo to you all (I am just joking ) But what are you thoughts?. Are states worth it?, are there situations where states are truly useful or are you better off using other methods to achieve the same ends?. I am rather curious to hear your thoughts on this subject. ---Sub note--- I am not directly accusing anyone but I have noticed over the last week there does seem to have been discourse between some of the users of this forum. I am seeking nothing more than an interesting discussion on the subject of states and the practicality of their uses. Purely from a point of interest and also boredom ^_^. All opinions are valid and welcome :).
  8. Yep i looked there and also at llTeleportAgentGlobal which is where i pasted that text from.
  9. Ahhhhhhhh ok i get you. Why on earth doesn't it just say that on the wiki instead of this "look_at is not the coordinates of a point in the region. The look_at vector is <llCos(facing), llSin(facing), 0.0> where facing is the angle towards which the arriving avatar is to look." The above confused me a little as i was like "yes thats all well and good but how do you set theses values and what specifically to..." Thank you for taking the time to clear that up for me, i greatly appreciate it.
  10. So, 256,256,0 does NE where as 128,128,0 does NW yet 192,192,0 does not face north which i would have thought it would do as 192 is halfway between 128 and 256. 192 faces (at a visual guess from minimap) about 10 degree NW of North...
  11. So....if <256,256,0> is facing NE do you just alter the X and Y values of the vector to achieve the other directions?. Idk why they couldnt just allow you to get the rotation of a object thats facing the way you want to face when you land and use that. So, i may be wrong in understanding this, but if i set to 128,128,0 then i should be facing SW?
  12. Hi there. So, i have been playing around with experiences and i am currently playing around with the llTeleportAgent function. I have used this function many times before but have never been able to properly figure out how you are supposed to set the lookat correctly. I have tried everything from the rotation of the avatar to seeing if it is similar to the lookat on llSitTarget i.e <0,0,270> and yet NOTHING that i try seems to be working. Could someone who is knowledgable on this subject please, very kindly, take the time to explain : 1. How the lookat works exactly (i.e what kind of angle its looking for etc) 2. How you are supposed to figure out what values to put to face a certain direction (because honestly, im stumped) If someone would take the time to do this i would be so thankful :) Also, i have already read through the wiki. It was not particularly helpful in helping me understand this section of the function.
  13. I tested out Hi-Fi alpha the other day. Gave it an hour of my time and even with the documentation it took me around 30 minutes to actually get an avatar to load. The world would barely load. The character models do not look all that great. The scripting system uses Java and its a total cluster**bleep** to get anything done (let alone figure out how to use it properly). The build import options and movement are another cluster**bleep**. The viewer or 'interface' as its called is just outright confusing...its so so so so badly designed and not at all streamlined. I understand what 'Alpha' means but Hi-Fi made big promises and so far i cant say it delivers on any of them (one case in point...connection speed to server). I mean, just trying to figure out how to teleport to other zones was a challenge in itself(and i still havent got the hang of finding my way around the worlds). The world barely loads and in my opinion shouldnt even be at Alpha release yet. I mean...try it for yourself and leave feedback here but so far.....Second Life is 100x better. I understnad that things can only get better as with any Alpha but so far im fairly dissapointed.
  14. I tested out Hi-Fi alpha the other day. Gave it an hour of my time and even with the documentation it took me around 30 minutes to actually get an avatar to load. The world would barely load. The character models do not look all that great. The scripting system uses Java and its a total cluster**bleep** to get anything done (let alone figure out how to use it properly). The build import options and movement are another cluster**bleep**. The viewer or 'interface' as its called is just outright confusing...its so so so so badly designed and not at all streamlined. I understand what 'Alpha' means but Hi-Fi made big promises and so far i cant say it delivers on any of them (one case in point...connection speed to server). I mean, just trying to figure out how to teleport to other zones was a challenge in itself(and i still havent got the hang of finding my way around the worlds). The world barely loads and in my opinion shouldnt even be at Alpha release yet. I mean...try it for yourself and leave feedback here but so far.....Second Life is 100x better.
  15. Just wondering if anyone has any updates. We had the announcment and i was present at the later firestorm meeting with the lindens but since then i have heard nothing. Mostly whispers and un confirmed rumours. Would be nice if they kept us updated to some extent as some of us (ME...) are excited for this new world!
  16. I apologise if there is already a thread on this, but i just logged into the website and saw this in the news section : https://community.secondlife.com/t5/Featured-News/A-New-Perk-for-Premium-Subscribers/ba-p/2917357 Thanks!!! thats EXACTLY what we wanted as an extra perk to premium membership. Dear god i will run out right now and buy myself a years subscription...... or not. Now, whilst i understand that this would be handy for business owners and others who find their IM capped a lot, it is not exactly what i would call a 'perk' that would attract more people to purchasing premium... If Linden Labs really want to increase the chances of someone purchasing premium then how about raising the free land allowance to 1024 - 2048? or possibly increasing the stipend to 500L a week?....NOT adding 25 messages to the cap limit... that is a poor poor poor ass show. Bordering on pathetic. Seriously, i know the lab is developing a new world an all but they needa take their heads out of their rears where SL is concerned. GIVE US SOMETHING DECENT..... So sick of rip off premium prices that are just simply not worth it unless you buy land directly from the lab.....its much more cost efficient to just buy the lindens and rent a small parcel...if you bother to take the time and look you can aquire yourself a 512 size piece of land and buy 1200L from the lab for less than what they charge you for premium.... Then again if they did increase the land allowance or the stipend its guaranteed they would raise the prices...in their eyes....to match the new offer....
×
×
  • Create New...