• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows code animation idle problem X(

M

Mevxill

Guest
hello i code animation idle no working
var Right_key = keyboard_check(vk_right);
var Left_key = keyboard_check(vk_left);


// moveRight
if (Right_key){
phy_position_x += spd;
sprite_index = player_walk;
image_speed =10;
Direction = "Right"
}

}
// moveleft
if (Left_key){
phy_position_x -= spd;
sprite_index = player_walkleft;
image_speed = 10;
Direction = "Left"

}

if(!Right_key) and (!Left_key){
if(Direction = "Right"){
sprite_index = player_idle
}
if(Direction = "Left"){
sprite_index = player_idleleft
}

}
 
Last edited by a moderator:

Shawn Basnett

Discount Dev
I'd recommend moving this to the Programming Topic, you'll get more responses.

I'm noticing you have an else statement after the code for //move right that sets the sprite to idle, as well as code at the bottom that does that.

While I'm not exactly sure what you mean by not working, i assume that might be causing an issue, if not, it still shouldn't be needed.
 
M

Mevxill

Guest
I'd recommend moving this to the Programming Topic, you'll get more responses.

I'm noticing you have an else statement after the code for //move right that sets the sprite to idle, as well as code at the bottom that does that.

While I'm not exactly sure what you mean by not working, i assume that might be causing an issue, if not, it still shouldn't be needed.

How do I do it?
walk stop no idle
sorry i not so good english
 
Top