Jump to content


Photo

Moving Left And Right?


  • Please log in to reply
5 replies to this topic

#1 Mathguy2

Mathguy2

    GMC Member

  • New Member
  • 112 posts

Posted 31 January 2009 - 03:42 AM

Oh my gosh! My character won't move left and right! Any reasons why? I did everything correctly...
  • 0

#2 ~Dannyboy~

~Dannyboy~

    ~hoqhuue(|~

  • GMC Member
  • 2144 posts
  • Version:GM8

Posted 31 January 2009 - 03:50 AM

My character won't move left and right!

What else is new!

Any reasons why?

Yes look below!

I did everything correctly...

No you didn't, that's why!

Please post more information so we can be more helpful. :lol:
  • 0

#3 heyufool1

heyufool1

    Fail

  • GMC Member
  • 1651 posts
  • Version:GM8

Posted 31 January 2009 - 04:15 AM

Oh my gosh! My character won't move left and right! Any reasons why? I did everything correctly...

if it isn't working then you didn't do it correctly. All game maker is doing is converting all of your code into 0s and 1s, nothing more so game maker didn't make the mistake.
  • 0

#4 Schtauffen

Schtauffen

    GMC Member

  • New Member
  • 80 posts

Posted 31 January 2009 - 04:19 AM

if (keyboard_check(vk_left)) x-=2;
if (keyboard_check(vk_right)) x+=2;
if (keyboard_check(vk_up)) y-=2;
if (keyboard_check(vk_down)) y+=2;
There now you're object will move :lol:
  • 0

#5 heyufool1

heyufool1

    Fail

  • GMC Member
  • 1651 posts
  • Version:GM8

Posted 31 January 2009 - 04:22 AM

if (keyboard_check(vk_left)) {x-=2}else
if (keyboard_check(vk_right)) {x+=2}else
if (keyboard_check(vk_up)) {y-=2}else
if (keyboard_check(vk_down)) {y+=2}
i personally like it with the else statements, so there is no diagonal movement =)
  • 0

#6 Mathguy2

Mathguy2

    GMC Member

  • New Member
  • 112 posts

Posted 31 January 2009 - 10:28 PM

Guess I did make a mistake. Sorry I'm just a beginner anyways. Thanks for helping me guys.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users