Re: [slscripters] State Change From Global Functions

2 views
Skip to first unread message

Nox Ferocia

unread,
Sep 24, 2011, 3:16:37 PM9/24/11
to secondlif...@lists.secondlife.com
> Date: Sat, 24 Sep 2011 00:06:32 -0400
> From: "AnnM...@SLFBI.com" <AnnM...@SLFBI.com>
> Subject: Re: [slscripters] New Sit Target APIs
>
> In my case I was attempting to remove the caveat that described the
> unofficial state change from a global function using if(TRUE) state xyz
> which no longer works and probably borked thousands of scripts all over
> SL.  The caveat had suggested that it had worked for so long it was now
> a useful feature.  They took my suggestion and indicated that it no
> longer works so someone trying to diagnose a problem would see it had
> been removed, "corrected".
>
> Those things used to be editable
>
> AnnMarie Otoole

as far as I can see, Rand Linden made the edit that says that no
longer works, BUT, Kaluura Boa has reported on the forums that it's
still working.
_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters

AnnM...@slfbi.com

unread,
Sep 24, 2011, 3:37:27 PM9/24/11
to Nox Ferocia, SL Scripters
I tested it thoroughly and there was no doubt whatever that it was failing.

When I reported it, I indicated that I had only tested it on one server
but the fact that it was failing anywhere was sufficient reason to
remove the caveat suggesting it could be used. I saw no reason to test
in other server versions. Since it was not supported I could not see
filing a JIRA to have it repaired. It should be on a wish list for a
future implementation but I wouldn't hold my breath on getting any response.

Use it at your own risk but heed the warning that it is not reliable.

AnnMarie Otoole

AnnM...@slfbi.com

unread,
Sep 24, 2011, 9:35:27 PM9/24/11
to Ralph Martinez, SL Scripters
I ran a similar simple test in my home sim and that is working OK.
The original "hint" specifically said that you should not have an else
instruction following the "if()" although I've never tested if that was
a problem.
The one that gave problems was much more complex with about 4 states
conditionally calling the function.
One consistently failed.
It is possible that the one that was failing was attempting to transfer
to the same state calling it but this program had been working fine for
over a year.

This one does not work.

integer i;
goToDefault(){
if(TRUE) state default;
}

default{
state_entry(){
i++;
llOwnerSay("In default i="+(string)i);
}

touch_start(integer t){
llOwnerSay("switching state default");
goToDefault();
llOwnerSay("Returned from call, failed to depart");
}
}


But unfortunately I can't test the original script.

The recent roll out borked PRIM_PHYSICAL instructions so my vehicles are
without brakes and overshooting the roadways all over SL. Over 2,000
returned to Inventory in the last 24 hours. One or more of those
vehicles landed on private land and they filed an AR. My account has
been put on "administrative hold" for encroachment so I can't repair my
vehicles or re-check the original script.

AnnMarie Otoole

On 9/24/2011 7:27 PM, Ralph Martinez wrote:
> AnnMarie: Can you test the following and see if it works for you. This
> works on my sim and a sandbox area I tested in.
>
> integer switch = -1;
>
> something1()
> {
> llWhisper(0,"@something1() ");
> }
>
> check_statejump(integer s)
> {
> llWhisper(0,"@check_state()");
> if(TRUE) // trick to allow jump to a state
> {
> if(s != -1)
> {
> llWhisper(0,"Going to something1() function...");
> something1();
> llWhisper(0,"@check_statejump() returned from something1()
> function");
> }
> else
> {
> llWhisper(0,"JUMPING TO STATE NOW.");
> state testState;
> }
> } // end trick to allow jump to a state
> }
>
> default
> {
> state_entry()
> {
> llSay(0, "Hello, Avatar!");
> }
>
> touch_start(integer total_number)
> {
> switch = switch * -1; // flip switch
> check_statejump(switch);
> }
> }
>
> state testState
> {
> state_entry()
> {
> llWhisper(0,"Entered state");
> state default;
> }
> state_exit()
> {
> llWhisper(0,"Now leaving state");

Reply all
Reply to author
Forward
0 new messages