Game Development Community

new mounted object

by Anthony Rosenbaum · in Torque Game Engine · 12/21/2002 (11:41 pm) · 1 replies

Ok, I am trying to replicate the mounting process in the shapeBase class. I am getting familiar with torque, and had some questions. I presume the BitMasks are high priority data. What is the limit to addimg masks?
example
enum ShapeBaseMasks {
      NameMask        = Parent::NextFreeMask,
      DamageMask      = Parent::NextFreeMask << 1,
      NoWarpMask      = Parent::NextFreeMask << 2,
      MountedMask     = Parent::NextFreeMask << 3,
      CloakMask       = Parent::NextFreeMask << 4,
      ShieldMask      = Parent::NextFreeMask << 5,
      InvincibleMask  = Parent::NextFreeMask << 6,
      SkinMask        = Parent::NextFreeMask << 7,
	  HideNodeMask    = Parent::NextFreeMask << 8,
      SoundMaskN      = Parent::NextFreeMask << 9,
													       // Extends + MaxSoundThreads bits
      ThreadMaskN     = SoundMaskN  << MaxSoundThreads,  // Extends + MaxScriptThreads bits
      ImageMaskN      = ThreadMaskN << MaxScriptThreads, // Extends + MaxMountedImage bits
      NextFreeMask    = ImageMaskN  << MaxMountedImages
   };

   enum BaseMaskConstants {
      SoundMask      = (SoundMaskN << MaxSoundThreads) - SoundMaskN,
      ThreadMask     = (ThreadMaskN << MaxScriptThreads) - ThreadMaskN,
      ImageMask      = (ImageMaskN << MaxMountedImages) - ImageMaskN
   };
I wanted to add another mask for bodyParts.
Ass you can see I added the hide node code
and wanted to create a way to add new dts mesh onto nodes on a base model. Right now my view is to use shapebaseimage objects to make the body elements.

#1
12/22/2002 (1:23 am)
Stefan, did you get the hide node code to work? when I tried it didnt hide the appropriate node.

Anyway, take a look at the datatype that sends the bitmask info, I reckon its 32bit, so thats probably the number of masks you can safely use.

Phil.