Difference between revisions of "Talk:Do while"
Line 11: | Line 11: | ||
If a script is looping (do while) when the object it's in is taken in to inventory and the script has an [[on_rez]]() [[llResetScript]]() set, the script never registers the [[on_rez]]()!! Thus the script does not reset. '''Also'''; What would you recommend as the best method to break into a loop? I made one script with a [[llSetScriptState]]() and [[llResetOtherScript]]() but if you wanted to do that in a linked prim it would fail cause of the same prim limit of llResetOtherScript() etc. Any advice would be greatly appreciated as usual. -- '''[[User:EddyFragment Robonaught|Eddy]]''' <sup><small>([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])</small></sup> 18:05, 10 June 2009 (UTC) | If a script is looping (do while) when the object it's in is taken in to inventory and the script has an [[on_rez]]() [[llResetScript]]() set, the script never registers the [[on_rez]]()!! Thus the script does not reset. '''Also'''; What would you recommend as the best method to break into a loop? I made one script with a [[llSetScriptState]]() and [[llResetOtherScript]]() but if you wanted to do that in a linked prim it would fail cause of the same prim limit of llResetOtherScript() etc. Any advice would be greatly appreciated as usual. -- '''[[User:EddyFragment Robonaught|Eddy]]''' <sup><small>([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])</small></sup> 18:05, 10 June 2009 (UTC) | ||
:That is correct, events are not {{wikipedia|interrupts}}; that is to say they queue. Should probably put something about this in the [[on_rez]] and [[attach]] articles since that is where the pain is most often felt. I think there is something about it on the Events article... -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 02:39, 11 June 2009 (UTC) | :That is correct, [[events]] are not {{wikipedia|interrupts}}; that is to say they queue. Should probably put something about this in the [[on_rez]] and [[attach]] articles since that is where the pain is most often felt. I think there is something about it on the Events article... -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 02:39, 11 June 2009 (UTC) |
Revision as of 00:59, 13 June 2009
This is a bit of a hack. Because of the syntax of do-while, it can't use the normal template; and I'm not keen on modifying the template for just one page. So I went up to the root template. Strife Onizuka 13:57, 8 February 2007 (PST)
Is the bottom loop faster?
Is the bottom loop faster than the one on the top (if they were to both count to 5).Bobbyb30 Zohari 14:54, 28 February 2008 (PST)
- They both execute the same number of iterations and the same amount of bytecode, the only difference is the ordering of the operations. There is no reason to assume one or the other loop is faster. -- Strife Onizuka 17:41, 28 February 2008 (PST)
Interesting phenomenon
If a script is looping (do while) when the object it's in is taken in to inventory and the script has an on_rez() llResetScript() set, the script never registers the on_rez()!! Thus the script does not reset. Also; What would you recommend as the best method to break into a loop? I made one script with a llSetScriptState() and llResetOtherScript() but if you wanted to do that in a linked prim it would fail cause of the same prim limit of llResetOtherScript() etc. Any advice would be greatly appreciated as usual. -- Eddy (talk|contribs) 18:05, 10 June 2009 (UTC)
- That is correct, events are not interrupts; that is to say they queue. Should probably put something about this in the on_rez and attach articles since that is where the pain is most often felt. I think there is something about it on the Events article... -- Strife (talk|contribs) 02:39, 11 June 2009 (UTC)