Clipmodel contents spawnarg: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
No edit summary
 
No edit summary
 
Line 5: Line 5:
I found I kept having to resort to the SDK to change the contents flags of things, for example if I wanted them to have a clipmodel so that they could be stimmed, but didn't want them to interact with anything else, I set the contents to CONTENTS_FLASHLIGHT_TRIGGER, since we can't add new contents flags, this seemed like the most harmless dummy contents flag to set.
I found I kept having to resort to the SDK to change the contents flags of things, for example if I wanted them to have a clipmodel so that they could be stimmed, but didn't want them to interact with anything else, I set the contents to CONTENTS_FLASHLIGHT_TRIGGER, since we can't add new contents flags, this seemed like the most harmless dummy contents flag to set.


clipmodel_contents an int variable, and it MUST be set to one of the powers of two for the clipmodel contents. These ints may be found in /base/script/doom_defs.script, and they are reproduced here:
clipmodel_contents an int variable, and it MUST be set to one of the powers of two for the [[clipmodel contents]]. These ints may be found in /base/script/doom_defs.script, and they are reproduced here:


  #define CONTENTS_SOLID 1            // an eye is never valid in a solid
  #define CONTENTS_SOLID 1            // an eye is never valid in a solid

Latest revision as of 16:54, 11 September 2006

Originally written by Ishtvan on http://forums.thedarkmod.com/topic/3930

I have added the spawnarg: clipmodel_contents

I found I kept having to resort to the SDK to change the contents flags of things, for example if I wanted them to have a clipmodel so that they could be stimmed, but didn't want them to interact with anything else, I set the contents to CONTENTS_FLASHLIGHT_TRIGGER, since we can't add new contents flags, this seemed like the most harmless dummy contents flag to set.

clipmodel_contents an int variable, and it MUST be set to one of the powers of two for the clipmodel contents. These ints may be found in /base/script/doom_defs.script, and they are reproduced here:

#define CONTENTS_SOLID 1            // an eye is never valid in a solid
#define CONTENTS_OPAQUE 2           // blocks visibility (for ai)
#define CONTENTS_WATER 4            // used for water
#define CONTENTS_PLAYERCLIP 8       // solid to players
#define CONTENTS_MONSTERCLIP 16     // solid to monsters
#define CONTENTS_MOVEABLECLIP 32    // solid to moveable entities
#define CONTENTS_IKCLIP 64          // solid to IK
#define CONTENTS_BLOOD 128          // used to detect blood decals
#define CONTENTS_BODY 256           // used for actors
#define CONTENTS_PROJECTILE 512     // used for projectiles
#define CONTENTS_CORPSE 1024        // used for dead bodies
#define CONTENTS_RENDERMODEL 2048   // used for render models for collision detection
#define CONTENTS_TRIGGER 4096       // used for triggers
#define CONTENTS_AAS_SOLID 8192     // solid for AAS
#define CONTENTS_AAS_OBSTACLE 16384 // used to compile an obstacle 
                                    // into AAS that can be enabled/disabled
#define CONTENTS_FLASHLIGHT_TRIGGER 32768 // used for triggers that are activated by the flashlight

Again, just set this spawnArg if you want to set the contents to something other than default. It's set in idEntity::Spawn, so if something in the SDK sets the contents after idEntity::Spawn, it will override the clipmodel_contents var.