Thing

From ZDoom Wiki

Jump to: navigation, search

In Doom, things are used to represent players, monsters, pick-ups, and projectiles. Inside the game, these are known as actors. There are three ways to get an actor into your map. Internally ZDoom calls things 'Actors' so you will find both of these terms quite often.

Contents

Referencing Things/Actors

DoomEd numbers are the numbers used in the editor to represent an actor. When the map is loaded, an actor that corresponds to that number will be spawned at the location of that map thing. Although many actors have DoomEd numbers, not all of them do. For instance, a blue key card has a DoomEd number, but a rocket flying through the air does not.

Spawn numbers are the numbers used by specials such as Thing_Spawn to spawn actors in the game once the user has started playing the map. Although DoomEd numbers and spawn numbers both describe actors, they are not interchangeable—you must not use a spawn number on a map thing, and you must not use a DoomEd number for instance as a Thing_Spawn parameter.

Actor Names are the actual names each actor has internally (to test these you may want to try out the summon console command). These are used with the functions SpawnSpot and Spawn which allow you to spawn any actor available with Thing_Spawn and also all other actors (though some actors aren't meant to be spawned) such as cameras, scenery or whatever you might require.

If you create a new actor with the DECORATE lump, you can specify both the spawn number (SpawnNum), and the DoomEd number (DoomEdNum). The name you give the new DECORATE item is also its actor name, so you can also spawn it using that.

There is also a third set of numbers used to represent actors that is only important for DeHackEd. These numbers correspond to the order the actors were defined in doom2.exe. They have no meaning outside of ZDoom's DeHackEd loader.


Specification (Doom Format)

Bytes Data Type Description Notes
0-1 Signed Short X position
2-3 Signed Short Y position
4-5 Unsigned Short Angle 0 = East, 90=North
180=West, 270=South
6-7 Unsigned Short Type
8-9 Unsigned Short Flags


Specification (Hexen Format)

Bytes Data Type Description Notes
0-1 Unsigned Short Thing ID This value is used for scripts and specials
2-3 Signed Short X position
4-5 Signed Short Y position
6-7 Signed Short Z position
8-9 Unsigned Short Angle 0 = East, 90=North
180=West, 270=South
10-11 Unsigned Short Type
12-13 Unsigned Short Flags
14 Unsigned Byte Special action An action to be executed when this thing is destroyed or picked up
15 Unsigned Byte Action argument 1
16 Unsigned Byte Action argument 2
17 Unsigned Byte Action argument 3
18 Unsigned Byte Action argument 4
19 Unsigned Byte Action argument 5


Thing Flags

Thing Flags are in this format for Hexen/ZDoom: Thing Flags are in this format for Doom: Thing Flags are in this format for Strife:
bit hex description
00x0001Thing is on Skill levels 1 & 2
10x0002Thing is on Skill level 3
20x0004Thing is on Skill levels 4 & 5
30x0008Thing's Ambush flag is set
40x0010Thing is dormant until activated
80x0100Thing is in Single Player
90x0200Thing is in Co-Op
100x0400Thing is in Deathmatch
110x0800Thing is 25% translucent
120x1000Makes the thing invisible
130x2000Friendly monster
140x4000Thing stands still (only useful for specific Strife monsters or friendlies)
bit hex description
00x0001Thing is on Skill levels 1 & 2
10x0002Thing is on Skill level 3
20x0004Thing is on Skill levels 4 & 5
30x0008Thing's Ambush flag is set
40x0010Thing is not in Single player
50x0020Thing is not in Deathmatch
60x0040Thing is not in Coop
70x0080Friendly monster
bit hex description
00x0001Thing is on Skill levels 1 & 2
10x0002Thing is on Skill level 3
20x0004Thing is on Skill levels 4 & 5
30x0008Thing stands still (only useful for specific Strife monsters)
40x0010Thing is not in Single player
50x0020Thing's Ambush flag is set
60x0040Friendly monster
80x0100Thing is 25% translucent
90x0200Makes the thing invisible
Retrieved from "http://zdoom.org/wiki/Thing"
Personal tools