Also not sure of a bug but kind of annoying a little bit; it'd be nice if constants were at least put somewhere like in commenting so that one without access to the Constants menu due to Game Maker 8 having it as a registered feature could know what those values are.I will add a documentation about the constants in the Game Information description.
Also not sure if this is a bug but in at least one of the Link Action scripts (I am not on my laptop but on a school computer so I can't check), you had something like:What you saw was probably:
imag_l = image_number - 0.25;
I didn't fully look it over but I am not sure what that does. The image_number is the number of sub-images a sprite has, and normal the 0.25 would be replaced with a 1. That is to say that if image_number - 1 is equal to the last sub-image; this is because if a sprite has 7 sub-images, it's first one is denoted 0, thus the last sub-image is a 6.
if(image_index == image_number - 0.25) // image_speed = 0.25
What this does, is make the animation a bit more fluid. I noticed during a debug, when I view the instance variables of objLink, that "image_index" has a fraction. Meaning image_index is not a numerical variable, but a real variable. What I understand is that GM does the animation as follows (written in C):
//example assumes an increase in subimages
double image_index = 2.5; //the current subimage of the animation to draw.
double image_speed = 0.25; //the increase of the image_index of every frame.
double image_number = 3.0; //the total number of subimages.
drawSubimage( (int)image_index, x, y );
image_index += image_speed;
if( image_index >= image_number ) image_index = 0;
Thus if you do: image_index == image_number - 1; then the last subimage will only be shown for 1 single frame. When image_index >= image_number - image_speed; is done then the last subimage will be shown a few frames more and thus making the animation a bit more fluid.
This believe is confirmed by two things:
1) When releasing the bow an arrow is created when image_index == 1. Now for 4 frames subimage 1 has to be shown. Thus if image_index is numerical, it would mean that 4 times image_index == 1 evaluates true and 4 arrows are created. But in reality 1 arrow is created.
2) When calculating the offsets for walking with the bow and lantern I need to first do
round_i = floor(image_index)If I don't the offsets would be wrong and you get really weird animations.