Help needed! How do I make my guy move around in a certain area? PLEASE READ
alexconsinc
Member Posts: 54
Hey
I am working on my second game and need some help. It is basically kind of the classic Snake game, where you move around in lines collecting stuff to grow. Well, I want something like that, but I don't know how to do it. The character has to be able to move up, down, right and left by swiping to each directions and he carries on going to that direction. I might've explained it badly. If you don't understand something, please tell me. I really need help!
Thanks
I am working on my second game and need some help. It is basically kind of the classic Snake game, where you move around in lines collecting stuff to grow. Well, I want something like that, but I don't know how to do it. The character has to be able to move up, down, right and left by swiping to each directions and he carries on going to that direction. I might've explained it badly. If you don't understand something, please tell me. I really need help!
Thanks
Comments
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Once you know the direction of the swipe you can do the rules to tell you main actor ( snake?) to move in that direction using the move behavior (or similar).
I had to work out the same sort of logic for my swipe around the room template. Once the swipe was detected the room would animate around. Allowing you to move to the left or right or look at the ceiling or the floor.
You'll end up adding all sorts of extra rules, so the swipe only counts if it is over a certain length, or within a certain time..
As for keeping your actor (snake) with in a certain box, you'd add rules that say if its y pos was equal to or higher than a number (i,e,) 1000 change direction... Same for x... or you could have it collide with objects and change its direction when it detects a collision (but I would go for the more accurate maths setup).
New baby, any few minutes spare time I get at the moment is either spent looking at this forum, working on a project, making tea or sleeping.
@pipe What do you mean by walls?