GMS 2.3+ Sprite Animation Don't Move

My Animation Sprite Don't Move , I Looked At The Mask Collisions And Origin ,Still Doesn't Work

script_execute(get_input)

//Move
yx = (key_up - key_down)
xy = (key_left - key_right)

//Speed

if (xy == 0) and (yx == 0 )
{
len =0;
} else {
len = spd
}

//Direction

var dir = point_direction(xy,yx,0,0)

//Length

vspd = lengthdir_y(len,dir)
hspd = lengthdir_x(len,dir)

//Hspd

if place_meeting(y,x+hspd,obj_wall) {
while place_meeting(y,x+hspd,obj_wall) {
x+=sign(hspd)
}
hspd =0;
}
x+=hspd

//Vspd

if place_meeting(x,y+vspd,obj_wall) {
while place_meeting(x,y+vspd,obj_wall) {
y+= sign(vspd)
}
vspd = 0;
}
y+=vspd

image_index =sign(len)*.2
if (len == 0)image_speed =2;

if (vspd >0) {
sprite_index = player_up
} else if (vspd <0) {
sprite_index = player_down
}

if (hspd >0) {
sprite_index = player_left
} else if (hspd <0) {
sprite_index = player_right
}
 
Nidoking

This is setting your image_index to -0.2, 0, or 0.2. Do you know what the image_index is?

Kingdom Of Key
I don't know what image_index does
 

Nidoking

Member
This is an excellent time to learn how to use the Manual. It's in the Help menu. Once you open the Manual, hit the Index tab, then type "image_index" into the search box. Double-click the image_index topic and read the page that comes up. This can be used with any Game Maker built-in to tell you what it does.
 
Top