The MJ Rule – Excessive Wait Times in an AutoFX Line Entry

Posted by:

|

On:

|

It is called the MJ rule because MJ first stumbled upon it.

*events
TRACE,on
ELAPSED
1,”Event #1″,3
2,”Event #2″,5
3,”Event #3″,9
4,”Event #4″,21
5,”Event #5″,37
6,”Event #6″,44
7,”Event #7″,52
8,”Event #8″,79

*autofx
3,r15=Shoot$WAIT=3$r15=Holster$WAIT=4$

In this example the total wait times for event #3 is  (3+4) = 7. While it is less than the event time on event #3 (9), this is not the event that is applied. It is always the difference between the PREVIOUS  event and CURRENT event when ELAPSED time is used  which is the DURATION of Event #3, which is the most common type of EVENT TYPE used.

Subtract Event #2 time (5) from Event #3 Time (9).  9 – 5 = 4

Event #3. Its duration is only 4.  And so 7 seconds is greater than 4 seconds. There is not enough time for the WAITS to happen. This is an ERROR!

What we found out is that the consequences often happen many events later so its not obvious that the problem is on Event #3 because functions attached to event #3 might work fine.  In the real life case, the emote attached to event #7 did not fire. Where the behaviour will falter and suffer is complex and unpredictable.

This was argued to me. But once I found the problem and fixed the WAIT times so they were less than the duration of Event #3, the problem in Event #7 was fixed

======================

*events
TRACE,on
DURATION
1,”Event #1″,3
2,”Event #2″,2
3,”Event #3″,4
4,”Event #4″,12
5,”Event #5″,16
6,”Event #6″,7
7,”Event #7″,8
8,”Event #8″,27

When using DURATION as the Event Type, it is a lot easier and intuitive to detect. The DURATION for EVENT #3 is 4.

Posted by

in