Free Hero Mesh

Changes To Class definition file
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Changes to "Class definition file" between 2018-11-19 05:26:44 and 2018-11-19 05:41:32

23
24
25
26
27
28
29
30

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46


47
48



49


50

51
52
53
54
55
56
57
58


59
60
61


62
63
64


23
24
25
26
27
28
29

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78







-
+
















+
+


+
+
+

+
+

+








+
+



+
+



+
+

<h2>Top level blocks</h2>
At the top level (outside of any other blocks, and after the preprocessor has run, if any), the following kind of blocks are possible (all must be in parentheses):
  *  Class definition: The first token is the class name. See below section for details. Each class must be defined only once.
  *  Global user variable: The first token is the global variable name, and second is the initial value (a constant). If not specified, the initial value is zero. Example: <tt>(@money 100)</tt>
  *  Background color: Something like <tt>(Background 1)</tt> but replace 1 with the background colour from 0 to 255 (the default value is 1, which is normally black).
  *  Max animation steps: Something like <tt>(Animate 32)</tt> but replace 32 with the maxinum number of animation steps allowed, from 1 to 256. The default value is 32.
  *  Volume: Something like <tt>(Volume 10000)</tt> but instead of 10000 you can specify a different number; the default value is 10000. Any number can be used; this determines the volume limit to move diagonally between objects.
  *  Volume: Something like <tt>(Volume 10000)</tt> but instead of 10000 you can specify a different number; the default value is 10000. Any number can be used; this determines the volume limit to move diagonally between objects. See documentation about moving objects for further details.
  *  Default message handler: A message block like in a class definition, but no local user variables are allowed. If the class does not include this message lock, then this one is used by default. If no message block is defined at all, then the message does nothing and always returns zero.
  *  Function: A function definition. The first token is a user function name (such as <tt>&AddScore</tt>), and then the instructions for that function. No local user variables are allowed.

<h2>Constants</h2>
Where a constant value (of any type) is expected, you may use any of the following:
  *  Number
  *  Direction
  *  String
  *  Key code
  *  Class
  *  Message
  *  Sound
  *  Bit constant

<h2>Class definition blocks</h2>
The class definition block starts with the class name, and then the various things inside, which can be:
  *  <tt>(Arrivals)</tt>: (TODO)
  *  <tt>(Climb)</tt>: Put a number. Defines how high the object can climb; see the documentation about moving objects for details about what this does.
  *  <tt>Compatible</tt>: Enable better compatibility with Hero Mesh, including that some standard variables are now limited to sixteen bits. For new puzzle sets, it is normally better to avoid this flag, although not always.
  *  <tt>,Compatible</tt>: Similar to Compatible but does not limit variables to sixteen bits.
  *  <tt>(DefaultImage)</tt>: After the word DefaultImage is some numbers, or () with nothing in between or you can have a range by using () with two numbers in between. This defines which images are available for selection in the editor. If you write <tt>(DefaultImage ())</tt> then this class is not available to place objects in the editor at all. If the DefaultImage command is not included, all images can be used.
  *  <tt>(Density)</tt>: Put a number. Defines the density of the object. If there are multiple objects at the same location, this defines which ones are on top (meaning not obscured by others; does not mean its Y coordinate differs) and on bottom (meaning may be obscured by other objects) and the stuff in between. The object with the lowest density is on top, and highest density on bottom.
  *  <tt>(Departures)</tt>: (TODO)
  *  <tt>(EditorHelp)</tt>: After EditorHelp is one or more strings. Each is a line of help text for the composer.
  *  <tt>(Hard)</tt>: (TODO)
  *  <tt>(Height)</tt>: Put a number. Defines the height of the object; see the documentation about moving objects for details about what this does.
  *  <tt>(Help)</tt>: After Help is one or more strings. Each is a line of help text for the player.
  *  <tt>(Image)</tt>: After the word Image is several strings, which are the name of images in the [Picture file format|.xclass file] (without the .IMG suffix). Those are the pictures used as the images of this class; the first one listed is image number zero.
  *  <tt>Input</tt>: Causes the KEY message to be sent to all objects of this class when a move is played and no popup quiz is waiting.
  *  <tt>Invisible</tt>: Objects of this class are invisible at runtime.
  *  <tt>(Misc4)</tt>: After the word Misc4 is one or more numbers; bit constants are also allows. Defines the Misc4 value (a 32-bit number) for this class as the bitwise OR of all numbers specified. The game engine does not use the Misc values; it is for your own use.
  *  <tt>(Misc5)</tt>: Like Misc4 for sets Misc5 instead.
  *  <tt>(Misc6)</tt>: Like Misc6 for sets Misc5 instead.
  *  <tt>(Misc7)</tt>: Like Misc7 for sets Misc5 instead.
  *  <tt>Player</tt>: Indicate that the object of this class is the player object.
  *  <tt>Quiz</tt>: Hide values of local variables from the player by default. Can be overridden in the user configuration file.
  *  <tt>(Shape)</tt>: (TODO)
  *  <tt>(Sharp)</tt>: (TODO)
  *  <tt>Shovable</tt>: This object is pushable in any direction (if the object pushing it is strong enough).
  *  <tt>(Shovable)</tt>: Specifies which directions it can be pushed. After the word Shovable is either a 8-bit number, or can be one or more directions, which can be E, N, W, and S (diagonal shoving is not allowed).
  *  <tt>Stealthy</tt>: If this object moves, does not cause arrival and departure triggers.
  *  <tt>(Strength)</tt>: Put a number. Defines the strength of the object; see the documentation about moving objects for details about what this does.
  *  <tt>(SUBS)</tt>: A block of program instructions which is not associated with a message. It is not really that helpful (since you can use labeled blocks instead); it is provided in order to convert Hero Mesh puzzles into Free Hero Mesh.
  *  <tt>(Temperature)</tt>: After the word Temperature is a number. Defines the Temperature attribute of this class. Like the Misc values, it is not used by the game engine and is only for your own use.
  *  <tt>UserState</tt>: Does nothing, but can be used for your own purpose.
  *  <tt>VisualOnly</tt>: Most interactions of this object with other objects are suppressed.
  *  <tt>(Volume)</tt>: Put a number. Defines the volume of the object; see the documentation about moving objects for details about what this does.
  *  <tt>(Weight)</tt>: Put a number. Defines the weight of the object (it probably should be "Mass" instead of "Weight", but it isn't); see the documentation about moving objects for details about what this does.