move to
PRRP games
Member Posts: 27
He guys,
I'm making a game like subway surfers (when you swipe it go to the other row)
But if I use the move to attribute, it won't work.
Somebody knows how I can make the gameplay like that??
Thanks!
Answers
Why not? What happens when you try it? What does your rule look like? What happens if you just have a MoveTo behavior by itself and not part of a rule? Does it do anything?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
rules of my main character:
Rule:
key: if left is down
do: move to: self.position.x-110 ; self.position.y
Rule:
key: if right is down
do: move to: self.position.x+110 ; self.position.y
And does it make a difference if you hold down an arrow key for some time (e.g. 2 seconds) rather than just pressing and releasing it?
Do you have the MoveTo behavior set to relative to actor or relative to scene? Make sure it's set to scene.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
if I hold it for a longer time it works fine. So can I set a minimum, so my actor will move at least 110 and 110 at max?
At least 110 and 110 at max? Wouldn't that be exactly 110?
We're six posts in and I still don't know any more than "it won't work." I'd need more details and I'd need to know the answers to the questions I asked above in order to help you out.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I don't think i worked it out on the right way, so i only want to know how i can make this:
Picture:
" alt="" title="" />
When I press/swipe to the left, it wil move to that exact point (blue square on the left)
When I press/swipe to the right, it wil move to that exact point (blue square on the right)
I know you're asking me to show my rules, attributes etc. so you can solve it, but I think i can better start all over.
Start by Googling swipe gamesalad. There are many tutorials and videos available.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Ok, I did that
I used this tutorial and i worked everthing out as i wanted. how can i set a maximum per slide. so it wont go to far?
Upload a screenshot of your Move To rule or however you created the movement and then post the link here. It will depend on how you've set it up.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Photo 1:
" alt="" title="" />
Photo 2:
Photo 3:
" alt="" title="" />
So my rules are (to make it more clear):
Rule:
Mouse is 'up'
do:
rule:
if game.right > 50
do:
change velocity
rule:
if game.left > 50
do:
change velocity
Rule
mouse is 'down'
do:
change game.left to 0
change game.right to 0
Change Velocity is not the best choice of behaviors for moving a set distance. It may have been the way that the video suggested but you're going to have a very difficult time getting a freely-moving actor to stop at exactly a certain pixel. There are ways to "snap to grid" but I recommend instead that you review this thread which deals with the same question:
http://forums.gamesalad.com/discussion/76369/stopping-an-actor/p1
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I Read the treath but i can't get the good information out of it.
I am trying to make a grid now for a couple of days, so can somebody say how to make a simple grid, just so i know how a grid works. I made a new project with just a player and a raster, the player can only move left en right when key left and key right are pressed.
I want to make it stop at a certain postition and let it move further when you press the left/right button again.
Hopeley somebody has some cleare and simple instructions