Difference between revisions of "Kill Sim"

From SimsWiki
Jump to: navigation, search
m (Adding new global BHAV category)
m (Usage: Added info about the constant stuff.)
 
(9 intermediate revisions by one user not shown)
Line 1: Line 1:
This primitive is used to kill a sim.
+
{{GlobalBHAV
 +
|name=Kill Sim
 +
|instance=0x0189
 +
|expansion=The Sims 2
 +
}}
 +
 
 +
==Code==
 +
###
 +
# Group = 0x7FD46CD0, Instance = 0x189
 +
# Title = Kill Sim
 +
#
 +
# Format = 8009, Params = 1, Locals = 2
 +
# Tree type = 0, Header flag = 6, Tree version = 51 (81), Cache flags = 0
 +
 +
    0: [[Death - Is Sim Dead? (NID)]](my person data neighbor id (0x1F)); true: 13, false: 16
 +
    1: Param 0 == Const 0x130(Death Types):0x2(2); true: D, false: 4
 +
    2: [[Group - Score - Affect Score (Event)]](Const 0x149(EP2 - Date Events):0x60(116 (0x74)), Me, 0, 0); true: 3, false: error
 +
    3: [[Group - Remove Sim]](Me); true: 12, false: 12
 +
    4: My Attribute 0xE := Param 0; true: C, false: error
 +
    5: Create New Object Instance: GUID 0x84EC24A8 (0x7F404283: NPC - Unique - Grim Reaper), place out of world (put new object id in stack object); true: 8, false: 2
 +
    6: My Attribute 0x15 := 1; true: B, false: error
 +
    7: Set to Next: object of type GUID 0x84EC24A8 (0x7F404283: NPC - Unique - Grim Reaper); true: 8, false: 5
 +
    8: Local 0 := Stack Object; true: 9, false: error
 +
    9: Stack Object := Me; true: 15, false: error
 +
    A: Push Interaction: #0x0 of Local 0 onto the stack object's queue, maximum priority, use icon from Local 1, Icon Index is 0x1; true: true, false: 2
 +
    B: Stack Object := 0; true: 7, false: error
 +
    C: my person data Ghost Flags (Routing Behavior) (0x44) Set Flag IsGhost; true: 6, false: error
 +
    D: [[Skill - End]]; true: 4, false: error
 +
    E: Temp 4 := -8842 (0xDD76); true: F, false: error
 +
    F: Temp 5 := -29207 (0x8DE9); true: 15, false: error
 +
    10: My Attribute 0x15 := 0; true: false, false: error
 +
    11: my person data Ghost Flags (Routing Behavior) (0x44) Clear Flag IsGhost; true: 10, false: error
 +
    12: My Attribute 0xE := 0; true: 11, false: error
 +
    13: [[Fade Object - OUT]](Me, 0, 100 (0x64), 1); true: 14, false: 14
 +
    14: [[Idle]](20000 (0x4E20)); true: 14, false: error
 +
    15: Local 1 := 0; true: A, false: error
 +
    16: .[[Kill - Can Sim Die?]](Me); true: 1, false: 2
 +
 
 +
==Purpose==
 +
This is used to kill a Sim, summon the reaper, and assign the ghost color and behavior.
 +
 
 +
==Usage==
 +
There is only one argument for this global.
 +
 
 +
'''Argument 1''' (Parameter 0): The type of death to inflict upon the Sim. The following are valid choices (From Const 0x130(Death Types)):
  
==Overview==
 
Only the first byte appears to do anything. It chooses the way that the sim will die:
 
 
*00 - Death by Starvation
 
*00 - Death by Starvation
 
*01 - Death by Electrocution
 
*01 - Death by Electrocution
Line 9: Line 51:
 
*04 - Death by Old Age
 
*04 - Death by Old Age
 
*05 - Death by Disease
 
*05 - Death by Disease
*06 - Death by Fly
+
*06 - Death by Flies
 
*07 - Death by Fright
 
*07 - Death by Fright
 
*08 - Death by Satellite
 
*08 - Death by Satellite
 +
*09 - Unknown (Not used?)
 +
*0A - Death by Cow Plant (Uni)
 +
*0B - Death by Peeking into Vampire Coffin (NL)
 +
*0C - Death by Sunlight (NL)
 +
*0D - Death by Rally Forth (OfB)
 +
*0E - Death by Elevator (OfB)
 +
*0F - Death by Hail (Seasons)
 +
*10 - Death by Lightning (Seasons)
 +
 +
So, now that we've got all that figured out, let's say you want to kill a sim with Rally Forth! You would use these arguments:
 +
 +
07 0D 00 00 00 00 00 00
 +
00 00 00 00 01 00 00 00
 +
 +
Which should yield this from SimPE's BHAV editor:
 +
 +
[global 0x0189] Kill Sim (1 arg:
 +
  Literal 0x000D)
  
==See also==
+
For more information on how arguments work, refer to this page: [[Using BHAVs With Arguments]].
*[[Primitives]]
+
*[[SimAntics]]
+
  
[[Category:Modding]]
+
==Examples==
[[Category:Global BHAVs|{{PAGENAME}}]]
+
You can see this BHAV in use in the cowplant, vampire coffin, Rally Forth! interaction, and many other places.

Latest revision as of 15:15, 25 April 2007

Kill Sim
Instance:0x0189
Game Version:The Sims 2


Contents

[edit] Code

###
# Group = 0x7FD46CD0, Instance = 0x189
# Title = Kill Sim
#
# Format = 8009, Params = 1, Locals = 2
# Tree type = 0, Header flag = 6, Tree version = 51 (81), Cache flags = 0

    0: Death - Is Sim Dead? (NID)(my person data neighbor id (0x1F)); true: 13, false: 16
    1: Param 0 == Const 0x130(Death Types):0x2(2); true: D, false: 4
    2: Group - Score - Affect Score (Event)(Const 0x149(EP2 - Date Events):0x60(116 (0x74)), Me, 0, 0); true: 3, false: error
    3: Group - Remove Sim(Me); true: 12, false: 12
    4: My Attribute 0xE := Param 0; true: C, false: error
    5: Create New Object Instance: GUID 0x84EC24A8 (0x7F404283: NPC - Unique - Grim Reaper), place out of world (put new object id in stack object); true: 8, false: 2
    6: My Attribute 0x15 := 1; true: B, false: error
    7: Set to Next: object of type GUID 0x84EC24A8 (0x7F404283: NPC - Unique - Grim Reaper); true: 8, false: 5
    8: Local 0 := Stack Object; true: 9, false: error
    9: Stack Object := Me; true: 15, false: error
    A: Push Interaction: #0x0 of Local 0 onto the stack object's queue, maximum priority, use icon from Local 1, Icon Index is 0x1; true: true, false: 2
    B: Stack Object := 0; true: 7, false: error
    C: my person data Ghost Flags (Routing Behavior) (0x44) Set Flag IsGhost; true: 6, false: error
    D: Skill - End; true: 4, false: error
    E: Temp 4 := -8842 (0xDD76); true: F, false: error
    F: Temp 5 := -29207 (0x8DE9); true: 15, false: error
   10: My Attribute 0x15 := 0; true: false, false: error
   11: my person data Ghost Flags (Routing Behavior) (0x44) Clear Flag IsGhost; true: 10, false: error
   12: My Attribute 0xE := 0; true: 11, false: error
   13: Fade Object - OUT(Me, 0, 100 (0x64), 1); true: 14, false: 14
   14: Idle(20000 (0x4E20)); true: 14, false: error
   15: Local 1 := 0; true: A, false: error
   16: .Kill - Can Sim Die?(Me); true: 1, false: 2

[edit] Purpose

This is used to kill a Sim, summon the reaper, and assign the ghost color and behavior.

[edit] Usage

There is only one argument for this global.

Argument 1 (Parameter 0): The type of death to inflict upon the Sim. The following are valid choices (From Const 0x130(Death Types)):

  • 00 - Death by Starvation
  • 01 - Death by Electrocution
  • 02 - Death by Drowing
  • 03 - Death by Fire
  • 04 - Death by Old Age
  • 05 - Death by Disease
  • 06 - Death by Flies
  • 07 - Death by Fright
  • 08 - Death by Satellite
  • 09 - Unknown (Not used?)
  • 0A - Death by Cow Plant (Uni)
  • 0B - Death by Peeking into Vampire Coffin (NL)
  • 0C - Death by Sunlight (NL)
  • 0D - Death by Rally Forth (OfB)
  • 0E - Death by Elevator (OfB)
  • 0F - Death by Hail (Seasons)
  • 10 - Death by Lightning (Seasons)

So, now that we've got all that figured out, let's say you want to kill a sim with Rally Forth! You would use these arguments:

07 0D 00 00 00 00 00 00
00 00 00 00 01 00 00 00

Which should yield this from SimPE's BHAV editor:

[global 0x0189] Kill Sim (1 arg:
 Literal 0x000D)

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

[edit] Examples

You can see this BHAV in use in the cowplant, vampire coffin, Rally Forth! interaction, and many other places.

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox