Search found 71 matches

by John Mela
Thu Feb 18, 2021 1:05 am
Forum: General Discussion
Topic: I'm involved in the Mars Landing tomorrow!
Replies: 5
Views: 118

Re: I'm involved in the Mars Landing tomorrow!

I'll be following very carefully your name's descent to the Martian surface, Snoots, and hoping it all goes well for you (and for NASA and humanity itself).
by John Mela
Wed Feb 03, 2021 2:23 pm
Forum: Building and Texturing
Topic: Double-Sided Texture
Replies: 9
Views: 249

Re: Double-Sided Texture

The viewer, not the server, generates particles when the object is within draw distance. As far as the server's concerned, particles are nothing more than a bunch of numbers stored in the prim's data. If nobody's around to see the particles (like trees falling in the forest), it's just those numbers...
by John Mela
Sun Jan 03, 2021 1:30 pm
Forum: Scripting
Topic: What actually happens in a script when the sim restarts?
Replies: 14
Views: 982

Re: What actually happens in a script when the sim restarts?

I don't know what happens to events in progress at the time the sim stopped. I would expect they'd be terminated. A good practice is to design your code for cases where events fail to execute. I've been trying to do this more lately, in the knowledge that OpenSim will terminate events if they've bee...
by John Mela
Fri Jan 01, 2021 2:43 pm
Forum: Scripting
Topic: Arcadia's Scripts
Replies: 43
Views: 2117

Re: Arcadia's Scripts

Now here is something that further confuses the issue. Look at this modification of your script John: integer b; default{ touch_start(integer a){ b = FALSE; if (b = TRUE) { llOwnerSay("TRUE!"); } b=TRUE; if(b = FALSE) { llOwnerSay("FALSE!"); } } } When this is run, it says TRUE! But the "reverse" l...
by John Mela
Thu Dec 31, 2020 10:13 pm
Forum: Scripting
Topic: Arcadia's Scripts
Replies: 43
Views: 2117

Re: Arcadia's Scripts

You're welcome, Snoots. Information like this needs to be shared more widely than it is. Some thoughts on specific points: is in my mind an ultimate example of really bad coding structure Absolutely! I only wrote that as a bare-bones snippet to demonstrate the behaviour of = in an if statement. Some...
by John Mela
Thu Dec 31, 2020 9:46 pm
Forum: Scripting
Topic: What actually happens in a script when the sim restarts?
Replies: 14
Views: 982

Re: What actually happens in a script when the sim restarts?

Yes, to know why a region restart breaks those scripts, we'd need to see the code. One possible contender, which I've seen in freebie scripts in SL, is something like this: changed(integer change) { llResetScript(); } which is an indiscriminate reaction to any change that fires that event, and I've ...
by John Mela
Thu Dec 31, 2020 6:53 pm
Forum: Scripting
Topic: What actually happens in a script when the sim restarts?
Replies: 14
Views: 982

Re: What actually happens in a script when the sim restarts?

Scripts are definitely not reset on a region restart (otherwise, there'd be no point in having change(CHANGED_REGION_START) because it would never happen!). The current script state is saved, and restored when the region sim boots. For the most part, scripts don't have to worry about region restarts...
by John Mela
Thu Dec 31, 2020 2:30 pm
Forum: Scripting
Topic: Arcadia's Scripts
Replies: 43
Views: 2117

Re: Arcadia's Scripts

= is a logic comparison (Boolean) if (A = TRUE) This isn't quite true, Snoots - it's a lot simpler than that[1]. Consider this code: integer b = FALSE; if (b = TRUE) llOwnerSay("huh?"); If = were a boolean comparison operator, you'd expect no output, but it prints "huh?". Why? The reason is that = ...
by John Mela
Tue Dec 29, 2020 1:37 pm
Forum: Scripting
Topic: Arcadia's Scripts
Replies: 43
Views: 2117

Re: Arcadia's Scripts

I think the other issue was this code in the touch_start() event:

Code: Select all

                if (spin==3){
                    spin==0;
                }
I'm a little surprised that compiled even in SL - the "spin==0" part should be "spin=0" (assignment, not comparison). Graham's version fixed that.
by John Mela
Tue Dec 29, 2020 10:32 am
Forum: Scripting
Topic: Arcadia's Scripts
Replies: 43
Views: 2117

Re: Arcadia's Scripts

My first guess is that this line needs changing:

Code: Select all

 if (llDetectedLinkNumber(0)==11&running==FALSE) // touching backboard
That's assuming the backboard prim is link number 11, which might not be the case if the object has been relinked.