Old School RPG Movement

poorcollegedevpoorcollegedev Member Posts: 289
edited May 2012 in Working with GS (Mac)
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!

Best Answer

  • UtopianGamesUtopianGames Posts: 5,692
    Accepted Answer
    I can send you a move in grid template if you mail me.



    We also have a free grid move using tables in the DBA Resource Centre.

    Darren.

Answers

  • v00d0v00d0 Member Posts: 143
    edited May 2012
    Basically you have to create a rule where u say: If right key is pressed do this animation if left key is pressed do another animation like this:

    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.
  • poorcollegedevpoorcollegedev Member Posts: 289
    @v00d0 alright, so i got him to move and stuff but i want it to move only 32 pixels at a time (like pokemon) and if held, continue going 32 pixels at a time. How do I achieve this?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Here's a demo using interpolate: https://www.dropbox.com/s/6zdl1fmnda1ndrs/Move on grid.zip

    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

  • MotherHooseMotherHoose Member Posts: 2,456
    @poorcollegedev

    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

    image MH
  • poorcollegedevpoorcollegedev Member Posts: 289
    @MotherHoose ok but how do i make it not so jerky and more fluid to where the animation will actually show?
  • poorcollegedevpoorcollegedev Member Posts: 289
    @UtopianGames Im sending a PM. Thank you sooo much, as well as everyone else!
  • UtopianGamesUtopianGames Member Posts: 5,692
    Sorry but i don't normally read my PM's i know... im bad.

    ToyboxUK[AT]hotmail.com

    Darren.
  • poorcollegedevpoorcollegedev Member Posts: 289
    @UtopianGames email sent. ksu.edu extension
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    The new messaging system (click the Inbox link at the top of the forums page) sends email notifications, so it's much better than the old PM system.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • MotherHooseMotherHoose Member Posts: 2,456
    edited May 2012
    @MotherHoose ok but how do i make it not so jerky and more fluid to where the animation will actually show?
    does increasing the frames in the animation help? slowing down the FPS?

    play with it @poorcollegedev … if it works, fine tune it.

    and @utopiangames stuff is really good stuff… for you and to you!

    image
Sign In or Register to comment.