|
Phidian Krasner
SL Exotic Pets
Join date: 22 Dec 2006
Posts: 26
|
10-23-2007 20:35
Ok, back on topic, not that I dislike state conversations... Wish I Had Known... ... that RPC communications are terribly flaky... use HTML polling. ... that Rotation math hurts... specially child prims. ... usage of memory bank scripts and Linked communications. Damn that heap of stacks... ... more than 50% of your code(Maybe exaggeration) is to prevent SL glitches and unforeseen oddities. ... States can be your friend... oh crap... now im talking about states...  ... to double and triple check those dang permissions before distributing a creation. ** edit ** Aye... I forgot that one... Having an Alt for testing is a good thing  Thanks, -Phidian Krasner
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
10-23-2007 21:04
States are useful when you have to do two things with the same event. For example, a touch event in one state can do one thing, (say, drop a dialog, which ultimately puts you into a different state), where, in the 2nd state, you may want a touch event to do something else. I wrote a swing script which uses 2 states, the default, which hangs out waiting on a changed event, and, when the changed event occurs, if the change is a changed_link (someone sat on it), it switches to a state appropriately named swing. In the swing state, the swing is set into an infinate loop, which swings the swing. Also, in the swing state, is another changed event, which, if the change once again is changed_link, (the avatar got off the swing), then it reverts back to the default state.
I think one of the problems is the examples in the wiki. They're not paticularly good examples, which is even stated so. It's showing states being used like a switch, which works, but is a stupid application for states. Perhaps a better example use of states is needed, because the switch concept does little more than push newer programmers in the direction of using states for light switches.
|
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
10-23-2007 21:04
From: Phidian Krasner ... to double and triple check those dang permissions before distributing a creation.
having an alt around to test permissions and code functionality is really handy
|