Free Hero Mesh

Changes To Messages
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 "Messages" between 2018-11-29 21:34:45 and 2018-11-30 04:42:21

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
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







-
+


+
-
+
+







+
+
+
+
+
+
-
+
+







Note that many commands cannot be used during the cleanup phase.

<h2>COLLIDE</h2>
If an object tries to move (regardless of the reason), if the <tt>CollisionLayers</tt> attribute of the moving object has any bits set shared with any object at the target location, then it can't move; in this case, it sends <tt>COLLIDE</tt> to the moving object and then <tt>COLLIDEBY</tt> to any conflicting objects at the target location.

There is also the possibility that an object cannot be created because of a conflict in the <tt>CollisionLayers</tt> attribute; in this case, the <tt>COLLIDE</tt> message isn't sent, but <tt>COLLIDEBY</tt> is.

Arg1 and Arg2 are the coordinates of the target location. From is the object causing the move.
Arg1 and Arg2 are the coordinates of the target location. Arg3 is all of the collision bits that are conflicting (always nonzero). From is the object causing the move.

If the return value is a number, the bits are used as follows:
  *  bit0 = Do not move the object. It will still send <tt>COLLIDEBY</tt> messages unless bit1 is also set.
  *  (TODO)
  *  bit1 = Do not send any <tt>COLLIDEBY</tt> messages.
  *  bit2 = Pretend the move attempt was successful even if it isn't.

<h2>COLLIDEBY</h2>
See <tt>COLLIDE</tt>.

If the message is sent due to an attempted creation, then From is 0; otherwise, From is the object that is attempting to be moved. Arg1 and Arg2 are the coordinates of that object (or 0 if From is 0). Arg3 is the class of the object that is about to be moved or created.

If the return value is a number, the bits are used as follows:
  *  bit0 = Do not move or create the object.
  *  bit1 = Do not send any more <tt>COLLIDEBY</tt> messages to further objects.
  *  bit2 = Pretend the move attempt was successful even if it isn't. (Has no effect in case of creation.)
  *  bit4 = Permit destroying this object to make room if necessary.
  *  bit5 = Permit exchaging the position of this object with the other one to make room if necessary. (This might not be possible if this object has multiple <tt>CollisionLayers</tt> bits set; it will check if it is possible.)
  *  bit6 = Permit moving this object into or out of the bizarro world to make room if necessary. (Only if the bizarro world is implemented; I am unsure if I will implement it or not.)
  *  (TODO)

In the case of bit4 and bit5 and bit6, it will only perform those actions if it is found that (in the state after all <tt>COLLIDEBY</tt> messages are sent) the specified actions are all possible and will allow the movement to occur. Even if it is found to be possible, some objects may refuse to be destroyed (or some messages sent during the attempt of these actions may cause other problems); if this happens, it will still try to perform as many actions as possible before failing.

<h2>CREATE</h2>
Sent to an object that has just been created by the <tt>Create</tt> command. From is the object that executed the <tt>Create</tt> command.

<h2>CREATED</h2>

<h2>DEPARTED</h2>