Old School RPG Movement
Ok, so Im starting to conceptualize my next project and need some help. I have all of the animations for each direction (total of 12).
01) How do I make it so that when players press a direction, the character will face that direction and stay that way? Do I just use differenr actors for each direction?
02) How do I do grid movemwnt. I need it so that if a direction is pushed, the player character will move 32 pixels in that direction.
Thanks soooooo soooooo much!
01) How do I make it so that when players press a direction, the character will face that direction and stay that way? Do I just use differenr actors for each direction?
02) How do I do grid movemwnt. I need it so that if a direction is pushed, the player character will move 32 pixels in that direction.
Thanks soooooo soooooo much!
Best Answer
-
UtopianGames Posts: 5,692
Answers
http://f.cl.ly/items/3N1r301O1R0G3g3Q3i1q/Schermata 05-2456072 alle 16.19.34.png
but i suggest you to use the Official Cross-Platform Controller Template, you can find it in your gamesalad creator, SCENE 1, you have the controllers and the grid movement. You just need to change the sprites and create you game.
It's not perfect... not sure why the actor "jumps" to the next square when holding down the left or right arrow key. And I didn't add up or down, but you could just copy the rules and adjust as needed.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
on moveableActor:
Rule: when
Event: right key is down
-Timer:
--Every 0.1 second
--changeAttribute: self.Position.X To: self.Position.X+32
Rule: when
Event: left key is down
-Timer:
--Every 0.1 second
--changeAttribute: self.Position.X To: self.Position.X-32
timer only fires when arrow key is down
==for player facingDirection
try gameAttribute … index type … name: dir 0 = standingStill; 1 = left; 2 = right
demo: http://www.mediafire.com/download.php?517li56tx1nklg6
ToyboxUK[AT]hotmail.com
Darren.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
play with it @poorcollegedev … if it works, fine tune it.
and @utopiangames stuff is really good stuff… for you and to you!