Difference between revisions of "Flood - Create"

From SimsWiki
Jump to: navigation, search
 
(Usage)
Line 59: Line 59:
 
'''Argument 1''' (Parameter 0): The object ID of the Sim OR object that you want to create this puddle.
 
'''Argument 1''' (Parameter 0): The object ID of the Sim OR object that you want to create this puddle.
  
'''Argument 2''' (Parameter 1): The type of puddle being created. These are valid values:
+
'''Argument 2''' (Parameter 1): A numerical value to tell the global what type of puddle to create. These are valid values:
  
 
  '''0''': GUID 0xF07D1F99 (Group 0x7F1D4DD8: Puddle)
 
  '''0''': GUID 0xF07D1F99 (Group 0x7F1D4DD8: Puddle)

Revision as of 15:20, 20 April 2007

Flood - Create
Instance:0x018A
Game Version:The Sims 2


Contents

Code

###
# Group = 0x7FD46CD0, Instance = 0x18A
# Title = Flood - Create
#
# Format = 8009, Params = 3, Locals = 0
# Tree type = 0, Header flag = 0, Tree version = 15 (21), Cache flags = 0 

    0: Param 1 -= 1; true: A, false: error
    1: Param 2 == 0; true: 2, false: B
    2: Create New Object Instance: GUID 0xF07D1F99 (0x7F1D4DD8: Puddle), place below object in stack param 0; true: 18, false: 5
    3: Create New Object Instance: GUID 0xEC566ABA (0x7F10D4CB: Puddle - Chocolate), place below object in stack param 0; true: 18, false: 6
    4: Create New Object Instance: GUID 0xF07D1F99 (0x7F1D4DD8: Puddle), place in front of stack object; true: 18, false: 8
    5: Stack Object := Param 0; true: 4, false: error
    6: Stack Object := Param 0; true: 7, false: error
    7: Create New Object Instance: GUID 0xEC566ABA (0x7F10D4CB: Puddle - Chocolate), place in front of stack object; true: 18, false: 9
    8: Create New Object Instance: GUID 0xF07D1F99 (0x7F1D4DD8: Puddle), place out of world (put new object id in stack object); true: 18, false: false
    9: Create New Object Instance: GUID 0xEC566ABA (0x7F10D4CB: Puddle - Chocolate), place out of world (put new object id in stack object); true: 18, false: false
    A: Verify - Person ID(Param 0); true: 1E, false: 1
    B: Param 2 == 1; true: 3, false: D
    C: Param 2 == 2; true: E, false: D
    D: Break Point: if (1 != 0); true: 2, false: error
    E: Create New Object Instance: GUID 0x724E3218, place below object in stack param 0; true: 18, false: F
    F: Stack Object := Param 0; true: 10, false: error
   10: Create New Object Instance: GUID 0x724E3218, place in front of stack object; true: 18, false: 11
   11: Create New Object Instance: GUID 0x724E3218, place out of world (put new object id in stack object); true: 18, false: false
   12: Find Location For: Stack Object relative to Param 0, facing N E S W; true: 14, false: 13
   13: Remove Object Instance: Stack Object, cleanup all; true: true, false: true
   14: Temp 0 := distance from Param 0 to Stack Object; true: 15, false: error
   15: Temp 0 < 2; true: true, false: 16
   16: Remove Object Instance: Stack Object, cleanup all; true: true, false: true
   17: Stack Obj's Attribute 0xD := Param 1; true: 19, false: error
   18: Ownership: Set Ownership to object(Param 0, Stack Object, 100 (0x64)); true: 17, false: error
   19: Stack Object's room (0x1D) > -1 (0xFFFF); true: true, false: 12
   1A: Create New Object Instance: GUID 0xF07D1F99 (0x7F1D4DD8: Puddle), place out of world (put new object id in stack object); true: 1B, false: 13
   1B: Find Location For: Stack Object relative to Param 0, facing N NE E SE S SW W NW; true: 18, false: 13
   1C: Param 2 == 0; true: 1A, false: 23
   1D: Create New Object Instance: GUID 0xEC566ABA (0x7F10D4CB: Puddle - Chocolate), place out of world (put new object id in stack object); true: 1F, false: 13
   1E: .Pet - Is Pet?(Param 0); true: 1C, false: 1A
   1F: Find Location For: Stack Object relative to Param 0, facing N NE E SE S SW W NW; true: 18, false: 13
   20: Create New Object Instance: GUID 0x724E3218, place out of world (put new object id in stack object); true: 21, false: 13
   21: Find Location For: Stack Object relative to Param 0, facing N NE E SE S SW W NW; true: 18, false: 13
   22: Break Point: if (1 != 0); true: 1A, false: error
   23: Param 2 == 1; true: 1D, false: 22
   24: Param 2 == 2; true: 20, false: 22

Purpose

This is what we use to create puddles of various sizes and varieties underneath Sims or objects. In the event it was a Sim that created the puddle, they will be labeled as the "owner" of that puddle. Why? Well, presumably so other sims can yell at and scold the Sim for making the puddle (also known as "Puddle Rage", there's a hack to fix it at More Awesome Than You!) or perhaps even pointing and laughing at them! We can only hope anyhow...

Usage

There are three arguments for this global.

Argument 1 (Parameter 0): The object ID of the Sim OR object that you want to create this puddle.

Argument 2 (Parameter 1): A numerical value to tell the global what type of puddle to create. These are valid values:

0: GUID 0xF07D1F99 (Group 0x7F1D4DD8: Puddle)
1: GUID 0xEC566ABA (Group 0x7F10D4CB: Puddle - Chocolate)
2: GUID 0x724E3218 (Group 0x7FED2D44: Puddle - Rain)

Argument 3 (Parameter 2): A value to indicate the size that the flood should be.

So, now that we've got all that figured out, let's say you want to make an object that creates a single chocolate puddle every hour or so for ... whatever reasons you have for doing something like that. :P In your Main function, you have a loop for it to idle for an hour, then you call the Flood - Create with the following operands:

03 0B 00 07 01 00 07 01
00 00 00 00 01 00 00 00

Which should yield this from SimPE's BHAV editor:

[global 0x018A] Flood - Create (3 args:
 My 0x000B (object id),
 Literal 0x0001,
 Literal 0x0001)

For more information on how arguments work, refer to this page: Using BHAVs With Arguments.

Examples

You can see this example in use in the toilet, shower, sink, or any other plumbing device that makes puddles when it breaks.

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox