playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Help! Movement to the right 2D GAME
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Help! Movement to the right 2D GAME (Read 1641 times)
MatiasHarder
Junior Playmaker
Posts: 51
Help! Movement to the right 2D GAME
«
on:
August 24, 2017, 11:21:26 AM »
In a 2D game how can i make the character move to the right a frame every time i press N?
example:
I press the N key and my character will move to the right a box (As in games 2d) and if I press 3 times this will move 3 times to the right.
Besides this how can I change the speed of movement?
If you can guide me with this I would be very grateful.
«
Last Edit: August 25, 2017, 08:40:59 AM by MatiasHarder
»
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Help! Movement to the right 2D GAME
«
Reply #1 on:
August 25, 2017, 05:09:43 AM »
Hi,
you mean you have a grid, and your player can only move one unit at a time right?
so you press n, player moves one unit, press n again, one more unit.
am I correct?
Bye,
Jean
Logged
MatiasHarder
Junior Playmaker
Posts: 51
Re: Help! Movement to the right 2D GAME
«
Reply #2 on:
August 25, 2017, 08:42:01 AM »
yes, If to that same I mean .. I would like to know how to do that for a game type rpg 2d..
You know how to do it?
Logged
djaydino
Administrator
Hero Member
Posts: 7616
Re: Help! Movement to the right 2D GAME
«
Reply #3 on:
August 25, 2017, 01:38:58 PM »
Hi,
you can do something like :
when n is pressed : "Get Postion"
then add 1 or deduct 1 (depending if you go left or right) to the X postition
then use set position (you can use a tweet or ease float/vector2/vector3 to move smoothly) the amount to add/deduct depends on your setup
Logged
Join the PlayMaker Discord Channel!
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Help! Movement to the right 2D GAME