SubZero Snowpaw Posted July 11, 2011 Share Posted July 11, 2011 Is it possible to create a more then one function in the lsl code and then recall a random function inside a event or is it just limited to the values or variables within the functions you can recall random? Link to comment Share on other sites More sharing options...
0 Rolig Loon Posted July 11, 2011 Share Posted July 11, 2011 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. 1 Link to comment Share on other sites More sharing options...
0 Knowl Paine Posted July 11, 2011 Share Posted July 11, 2011 I have no idea :smileytongue: There is a Scripting discussion Forum here also, feel free to repost your question there if you do not find a timely solution in the Q&A forum. A lsl link http://wiki.secondlife.com/wiki/LSL_Portal Link to comment Share on other sites More sharing options...
Question
SubZero Snowpaw
Is it possible to create a more then one function in the lsl code and then recall a random function inside a event or is it just limited to the values or variables within the functions you can recall random?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
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