Back to homepage
GearMessages
History
List of all gear messages.
Updated Sun, 26 May 2019 22:19:44 +0100 by Wuzzy

This is a list of gear messages. Gear messages are used to e.g. control hedgehogs.

List of gear messages

Identifier Meaning Parameter
gmLeft Walk left Not used.
gmRight Walk right Not used.
gmUp Aim up Not used.
gmDown Aim down Not used.
gmSwitch Switch hedgehog Not used.
gmAttack Attack Not used.
gmLJump Long jump Not used.
gmHJump High jump Not used.
gmSlot Weapons slot selected. Used.
gmWeapon Weapon seleced. Used.
gmTimer Timer set. Used.
gmAnimate Start animation Used.
gmPrecise Precise Not used.
gmDestroy Request gear to remove itself. If present, the gear's removal and cleanup routine will be called. Not used.
gmDelete Delete gear the “hard” way. The gear removal routine will be skipped. Use with care! Not used.
gmRemoveFromList Remove from gear list Not used.
gmAddToList Insert in gear list Not used.
gmAllStoppable Bitwise OR of gmLeft , gmRight , gmUp , gmDown , gmAttack and gmPrecise Not used.

gmAddToList and gmRemoveFromList are intended for use by the engine when changing order of gears in the list. It is not recommended that Lua changes these, and at present they are used together when changing a gear's Z (drawing order). For example, if Lua sets gmRemoveFromList , it would cause a leak of the gear, since Lua would no longer be able to restore it. Setting both together would have no effect since Lua cannot at present change Z.

See https://hg.hedgewars.org/hedgewars/file/default/hedgewars/uConsts.pas (search for "gear messages") for a current list.