• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Need help with bug i dont know whats wrong

S

Supereor

Guest
Hey all, first post on the new forum! Looks great, anyway I'm having a bug that I cant figure out I have this character and when you use an ability it will "stab: the spot right in front of him now it work. BUT it doesn't work when I hold up and left or up and right, it work with bottom and left and bottom and right. I'm not sure why heres the code
Code:
//The second abiltiy Slash
    if(keyboard_check_pressed(ord("E")))
    {
        if(!slash)
        {
            alarm [1] = 80;
            instance_create(x + lengthdir_x(8, image_angle), y + lengthdir_y(8, image_angle), obj_slash);
        }
    }
this is just a snippet from a larger step event but the other stuff is irrelevant to this.
 

Roderick

Member
Are you using a keyboard or a gamepad?

If a keyboard, you're probably a victim of keyboard ghosting. Try changing your input keys. If that makes it work, it's almost definitely a ghosting issue.

The only way around ghosting is to give the player the ability to customize their inputs (since which keys ghost vary from one make of keyboard to another), add gamepad support, or rewrite your game so that the player will never have reason to press more than 2 keys at a time.
 
Top