I feel sorry for bringing this up again, as I know it has been brought up before, but so far, I have not understood what do do about these issues.
Like others, I am having trouble with animating enemies. I know to add the id (as a negative) under def max_pattern, and got it to display a single sprite correctly, though not "animated" as such. Just standing still. After taking some damage, it started to move.
The problem is this:
When attacking, the enemy is facing backwards.
I edited the STANDBY_FIX as such
"STANDBY_FIX" => ["motion", "", 2, 1, 0, 12, 0, true, true, "" ],
and thereby got the sprite to face forward while standing still. I don't know how to make it stay facing the right way when attacking, or how to make it animate before taking significant damage.
I tried changing "WAIT" above it, switching 1 for 2 in the same slot, but then my game crashed. Then I tried INSTEAD, changing 1 for 2 on various attack keys. Again, my game crashed. Then I put all the 2s back to 1s (except STANDBY_FIX), but the crash persists.
The error message is as follows:
Script 'Journey System' line 1519: NoMethodError occurred.
undefined method 'frame_max' for nil:NilClass
That section appears like this. (Line highlighted red to be easily spotted)
#--------------------------------------------------------------------------
# ● 戦闘アニメ時間の取得
#--------------------------------------------------------------------------
def self.get_anime_time(anime_id)
return 0 if anime_id <= 0
return $data_animations[anime_id].frame_max * 4
end