Jump to content
  • 0

Scripting Question


SubZero Snowpaw
 Share

You are about to reply to a thread that has been inactive for 4672 days.

Please take a moment to consider if this thread is worth bumping.

Question

2 answers to this question

Recommended Posts

  • 0

If nothing else, you could certainly create a variable with a randomized value and use it to trigger user-defined functions.  For example, you could write

integer num = (integer)llFrand(4.0);

if (num == 0)

{

     function1();

}

else if (num == 1)

{

     function2();

}

//and so forth....

It's not as compact and clean as what you can write in other languages that have a case or switch conditional function, but it works.  If you want to follow up with further discussion, I suggest reposting your question in the LSL Scripting forum.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4672 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...