Jump to content


Photo

Room transition platform game


  • Please log in to reply
3 replies to this topic

#1 Shinryokin

Shinryokin

    GMC Member

  • New Member
  • 13 posts
  • Version:GM8

Posted 03 December 2011 - 08:10 PM

So the problem I am having is that when transitioning to a new room the character stops moving left or right, so if dropping from one screen into a new room while pushing left the character will stop moving left as soon as the new room starts. Once you press left again it will move but I need it to be a smooth transition and keep moving to the left without having to re-press the left key, this happens for any direction. Anyone got ideas on this?
  • 0

#2 DoubleD33D

DoubleD33D

    GMC Member

  • GMC Member
  • 111 posts
  • Version:GM8

Posted 03 December 2011 - 08:16 PM

So the problem I am having is that when transitioning to a new room the character stops moving left or right, so if dropping from one screen into a new room while pushing left the character will stop moving left as soon as the new room starts. Once you press left again it will move but I need it to be a smooth transition and keep moving to the left without having to re-press the left key, this happens for any direction. Anyone got ideas on this?


This could be solved by not using the key_press event. If it is possible you should change it to key event and that should solve it. If you depend on it using key_press then this could take a bit more work.
  • 0

#3 Shinryokin

Shinryokin

    GMC Member

  • New Member
  • 13 posts
  • Version:GM8

Posted 04 December 2011 - 08:37 AM

It didn't work, my concern is that in a PDF file I found on the functions of Game maker tells me that after a room transition it stops the code. I don't know if there is a work around for this or not. Does anyone know and am I reading it wrong? I believe it is like the main PDF file that people use for Game maker. It might also be possible that my friend who did the coding on it did it kinda weird, we are both still learning the script coding.
  • 0

#4 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • Retired Staff
  • 9260 posts
  • Version:Unknown

Posted 04 December 2011 - 09:53 AM

The problem is that when the room changes, all events stop.

One solution is not to use the GM events. Instead, check for keys in the STEP event with keyboard_check(...). That will pick up the key state after a single step has passed, since it's not an event.

-IMP
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users