F
FamicomLink
Guest
Hey there, first post.
I've been working on a simple platformer for a few months and I've come to a slight slow down with some coding issues for sprite/animation changes for a specific situation. I have looked all over and haven't found any proper solutions for this problem either, so I was hoping anyone here could help out.
I have a pushable block object made, but I can't get the sprites to change when pushing the block on the left or right side, and they only do change (sometimes) when the block is against a wall- and in one specific area while walking aboveby the block.
This here is the code used in the player object's step event under the platform physics action I have set up.
What exactly am I doing wrong?
I've been working on a simple platformer for a few months and I've come to a slight slow down with some coding issues for sprite/animation changes for a specific situation. I have looked all over and haven't found any proper solutions for this problem either, so I was hoping anyone here could help out.
I have a pushable block object made, but I can't get the sprites to change when pushing the block on the left or right side, and they only do change (sometimes) when the block is against a wall- and in one specific area while walking aboveby the block.
This here is the code used in the player object's step event under the platform physics action I have set up.
What exactly am I doing wrong?
Code:
if keyboard_check(vk_left) && (place_meeting(y,x-2, obj_block_push)) {sprite_index=spr_player_mask; sprite_index = spr_player_walk}
if keyboard_check(vk_right) && (place_meeting(y,x+2, obj_block_push)) {sprite_index=spr_player_mask; sprite_index = spr_player_walk}