776 Set the collision mask of the given gear with `gearUid`. |
776 Set the collision mask of the given gear with `gearUid`. |
777 The collision mask defines with which gears and terrain types the gear can collide. |
777 The collision mask defines with which gears and terrain types the gear can collide. |
778 |
778 |
779 `mask` is a number between `0x0000` and `0xFFFF` and used as a bitfield, which means you can combine these flags with `bor`. These are the available flags: |
779 `mask` is a number between `0x0000` and `0xFFFF` and used as a bitfield, which means you can combine these flags with `bor`. These are the available flags: |
780 |
780 |
781 || *Identifier* || *Value* || *Collision with …* || |
781 || *Identifier* || *Collision with …* || |
782 || `lfLandMask` || || Terrain || |
782 || `lfLandMask` || Terrain || |
783 || `lfCurrentHog` || || Current hedgehog and crates || |
783 || `lfCurrentHog` || Current hedgehog and crates || |
784 || `lfHHMask` || || Any hedgehogs || |
784 || `lfHHMask` || Any hedgehogs || |
785 || `lfNotHHObjMask` || || Objects, not hogs (e.g. mines, explosives) || |
785 || `lfNotHHObjMask` || Objects, not hogs (e.g. mines, explosives) || |
786 || `lfAllObjMask` || || Hedgehogs and objects || |
786 || `lfAllObjMask` || Hedgehogs and objects || |
787 |
787 |
788 Beware, the collision mask is often set by the engine as well. |
788 Beware, the collision mask is often set by the engine as well. |
789 |
789 |
790 Examples: |
790 Examples: |
791 <code language="lua">SetGearCollisionMask(gear, bnot(lfCurrentHegehog)) |
791 <code language="lua">SetGearCollisionMask(gear, bnot(lfCurrentHegehog)) |