Caterpillars that can face either direction

Version:

1.0

Added on:

02 Oct 2022 22:29

Tags:

Description:
Caterpillars that can face right (and blow smoke rings to the right) as well as left. Open a level using this snippet in MLLE to automatically have the Direction parameter available in the editor.
  1. void onLevelLoad() {
  2. ///@Event 110=Caterpillar                     |+|Object    |Cater  |Pillar|Direction:{Left,Right}1
  3.   jjObjectPresets[OBJECT::CATERPILLAR].behavior = function(obj) { obj.behave(BEHAVIOR::CATERPILLAR); if (jjParameterGet(uint(obj.xOrg) >> 5, uint(obj.yOrg) >> 5, 0, 1) == 1) obj.direction = 1; obj.behavior = BEHAVIOR::CATERPILLAR; };
  4. }