Idle - Hours
|Idle - Hours|
|Game Version:||The Sims 2|
### # Group = 0x7FD46CD0, Instance = 0x16E # Title = Idle - Hours # # Format = 8009, Params = 1, Locals = 1 # Tree type = 0, Header flag = 0, Tree version = 1 (1), Cache flags = 0 0: Idle - Minutes(60 (0x3C)); true: 1, false: error 1: Local 0 ++ and < Param 0; true: 0, false: true
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.
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.
When you call this BHAV, provide the literal number of Sim hours that you want the object to pause for. For example, if you want the object to idle for 2 Sim hours, feed in this:
07 02 00 00 00 00 00 00 00 00 00 00 01 00 00 00
Which should yield this from SimPE's BHAV editor:
[global 0x016E] Idle - Hours (1 arg: Literal 0x0002)
For more information on how this works, refer to this page: Using BHAVs With Arguments.
You can see the various idle functions in nearly all Main Functions of objects.