http://simswiki.info/index.php?title=Idle&feed=atom&action=historyIdle - Revision history2024-03-29T12:59:32ZRevision history for this page on the wikiMediaWiki 1.20.2http://simswiki.info/index.php?title=Idle&diff=12357&oldid=prevJfade at 19:28, 4 January 20072007-01-04T19:28:12Z<p></p>
<p><b>New page</b></p><div>{{GlobalBHAV<br />
|name=Idle<br />
|instance=0x0118<br />
|expansion=The Sims 2<br />
}}<br />
<br />
==Code==<br />
###<br />
# Group = 0x7FD46CD0, Instance = 0x118<br />
# Title = Idle<br />
#<br />
# Format = 8009, Params = 1, Locals = 0<br />
# Tree type = 0, Header flag = 0, Tree version = 2 (2), Cache flags = 0<br />
<br />
0: Sleep: for Param 0 ticks; true: true, false: error<br />
<br />
<br />
==Purpose==<br />
This is one of three [[Idle]] functions that are extremely useful in the [[Main Function]] of objects. They are used to cause the object to idle, or pause, for a period of time before moving on to the next line of code. <br />
<br />
When you use the normal [[Idle]] global function, you feed a numerical argument that tells the object how many ticks to pause for. 30 ticks equals one Sim minute, 1800 ticks equals one Sim hour, and so on. In order to save you from having to think, however, there are two other global functions to help with this conversion: [[Idle - Minutes]] and [[Idle - Hours]].<br />
<br />
==Usage==<br />
When you call this BHAV, provide the literal number of ticks that you want the object to pause for. Remember that 30 ticks equal one Sim minute. So, for example, if you want the object to idle for 1 Sim minute, feed in this:<br />
<br />
07 1E 00 00 00 00 00 00<br />
00 00 00 00 01 00 00 00<br />
<br />
Which should yield this from SimPE's BHAV editor:<br />
<br />
[global 0x0118] Idle (1 arg: Literal 0x001E)<br />
<br />
For more information on how this works, refer to this page: [[Using BHAVs With Arguments]].<br />
<br />
==Examples==<br />
You can see the various idle functions in nearly all [[Main Function|Main Functions]] of objects.</div>Jfade