Difference between revisions of "Talk:Do while"
(→Interesting phenomenon: new section) |
|||
Line 6: | Line 6: | ||
: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. -- [[User:Strife Onizuka|Strife Onizuka]] 17:41, 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. -- [[User:Strife Onizuka|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. -- '''[[User:EddyFragment Robonaught|Eddy]]''' <sup><small>([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])</small></sup> 18:05, 10 June 2009 (UTC) |
Revision as of 10:05, 10 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)