Jump to content


Photo

Help with a game


  • Please log in to reply
3 replies to this topic

#1 coolnilas

coolnilas

    GMC Member

  • New Member
  • 5 posts
  • Version:GM7

Posted 12 August 2011 - 09:01 PM

Hi.
I am currently working on a platform jumping game.
Therefore I need to know how to get the player from the left side of the screen to the right and the other way around.
Posted Image I know the picture is big, but...
Hope you understood this, if not the message me.


MODERATOR EDIT : You posted this in the Tutorials Forum where there is a HUGE banner saying not to post questions there! So, I have moved this to the Novice Q&A forum, but future posts in the tutorials section will just be deleted.

Edited by Nocturne, 12 August 2011 - 11:26 PM.

  • 0

#2 felixdav

felixdav

    GMC Member

  • GMC Member
  • 36 posts
  • Version:GM8.1

Posted 15 January 2012 - 07:18 PM

Hi.
I am currently working on a platform jumping game.
Therefore I need to know how to get the player from the left side of the screen to the right and the other way around.
Posted Image I know the picture is big, but...
Hope you understood this, if not the message me.


MODERATOR EDIT : You posted this in the Tutorials Forum where there is a HUGE banner saying not to post questions there! So, I have moved this to the Novice Q&A forum, but future posts in the tutorials section will just be deleted.

So you need to make a portals.
Steps:
1. Make a portal sprite, animated or not.
2. Make and object and name it obj_portal1 or whatever name you want.
3. In portal1 object, click the add event and then collision with the player.
4. Then, execute a code for the collision.
Code: x = obj_portal2.x
y = obj_portal2.y
5. Duplicate obj_portal1 and name it obj_portal2
6. So, since its your room..put obj_portal1 on the left side and put obj_portal2 on the right
7. In the obj_portal1 object go to the collision code and check the other button thats next to Applies to:

Hope this helps,
Felixdav
  • 0

#3 StewartB

StewartB

    GMC Member

  • GMC Member
  • 194 posts
  • Version:Mac

Posted 15 January 2012 - 08:05 PM

The problem with that is that the player object will jump to the other portal's origin when it teleports. You could just use obj_portal2.x with y just left as y, but it's a LOT easier to use the move_wrap function in the Outside Room event (specifying horizontal wrapping).

Hopefully this'll help solve your problem! :smile:

Edited by StewartB, 15 January 2012 - 08:07 PM.

  • 0

#4 Zealot644

Zealot644

    GMC Member

  • New Member
  • 266 posts
  • Version:GM8

Posted 16 January 2012 - 12:48 AM

There is a DnD function called 'Wrap Screen' which could probably solve this for you without causing any extra troubles. It is fairly self explanatory too so you probably wont need any further assistance.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users