How do I make my actor Player move like this?

idoistuffidoistuff Member Posts: 197
edited November -1 in Working with GS (Mac)
I want to try and make a game like this for my first game (don't worry I am not selling it on the appstore or anything, just for fun)

I want to know how to make my Player move like that? but instead of tapping just pressing the left and right keys on the keyboard.

Thanks!

Comments

  • VoidedSkyVoidedSky Member Posts: 1,095
    Hey. This is what should be in your actor:

    angle attribute: direction

    ---Move <self.direction>
    ---Speed <what ever your heart desires>

    ----Rule: When key <right> is down
    -----Change <self.direction> to <self.direction-90>

    ----Rule: When key <left> is down
    -----Change <self.direction> to <self.direction+90>

    This should be all. Hope this helps!
    ~CTM
  • idoistuffidoistuff Member Posts: 197
    what do you mean "angle attribute" I am new to this, I don't know really how to work gamesalad.
  • VoidedSkyVoidedSky Member Posts: 1,095
    When you create an attribute, select "Angle" from the attribute type list.
    ~CTM
  • idoistuffidoistuff Member Posts: 197
    okay so very dumb question here.. how do I create an attribute? I have

    ----Rule: When key <right> is down
    -----Change <self.direction> to <self.direction-90>

    ----Rule: When key <left> is down
    -----Change <self.direction> to <self.direction+90>

    all done.

    Thanks!
  • VoidedSkyVoidedSky Member Posts: 1,095
    When you are in an actors settings, on the left, there is an "Attributes" Panel. At the bottom of the attributes panel click the "+" and that will add a new actor. Do NOT type "self.direction" in the move behavior. Click the "e" and then click on arrow on the left. Then click on the name of your actor, and select the attribute you just created.
    ~CTM
  • idoistuffidoistuff Member Posts: 197
    EDIT: Wait I got it! Thanks!
  • idoistuffidoistuff Member Posts: 197
    How would I make it so my Player rotates to face the direction its going?
  • VoidedSkyVoidedSky Member Posts: 1,095
    http://gamesalad.com/wiki/
    Dig through this, it should help explain the basics.
    ~CTM
  • idoistuffidoistuff Member Posts: 197
    I have a few things I want to do but don't know how.

    -make the player rotate the direction it is heading.
    -when the player hits a wall to destroy player, wait 3 seconds then restart scene.

    also last but not least
    -whenever the scene starts I want a count down 3-2-1 GO! and when go appears the player will automatically start moving.
Sign In or Register to comment.