Idle - Hours

From SimsWiki
Revision as of 09:16, 25 April 2007 by Jfade (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Idle - Hours
Instance:0x016E
Game Version:The Sims 2


Contents

Code

###
# 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

Purpose

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.

Usage

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.

Examples

You can see the various idle functions in nearly all Main Functions of objects.

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox