Aug 19, 2014

personal note 7

(1) What happened:
Bias in the random movement.
If you use "Options: Direction Fix" and "Movement Type: Random" simultaneously,
The event biased to move to the fixed direction.

(2) Cause
In the line 114 of Game_Event,

  def move_type_random
    case rand(6)
    when 0..1;  move_random
    when 2..4;  move_forward
    when 5;     @stop_count = 0
    end
  end

Since direction is fixed, that "move_forward" goes to always same direction.



If I remember correctly,

in RPG Maker 2000, inner direction values can be changed even if direction if fixed.
And some crazy people used the direction of events as a substitute of variables.
VX Ace not allow it.


(3) Solution
when 2..4;  @direction_fix ? move_random : move_forward



('w') < ...harmless.

No comments:

Post a Comment