Player Can't Go Down!!!

bluebookbluebook Member Posts: 9
edited November -1 in Working with GS (Mac)
Hey, I made a basic game in game salad; there are 2 rules, move up and move down. Move up is set to the keyboard, and has the "Change Velocity" Behavior; direction is set to "90", Speed is "300", and it is "relative to: actor". The move down rule is is the same except is receives the "down" key on the keyboard for input; the "Change Velocity" is also the same except the direction is "270". However when i preview the game, the "Move Up" Rule works, but the "Move Down" does not; and I have put the "Reset Velocity Group" seen in the tutorial in both Rules. Any advise given would really help , Thanks

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    use move instead of change velocity and make it relative to the scene
  • bluebookbluebook Member Posts: 9
    Tried that, and its still not able to move down
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I think you'll have better luck getting help if you give more details. Many of the people that are best able to help you haven't gone through the beginner tutorials in a really long time.

    Can you layout your rules step by step for us so we can figure out what your doing?

    Quick question - Is this project copied and pasted from something else? Or did you start with something and add to it?

    If so, open the OTHERWISE section of each rule. You may find your problem their (often forget to check there and it is usually where the problem lies!)

    Good luck!
  • bluebookbluebook Member Posts: 9
    Yeah, no problem:

    Rule (Move Down):

    actor receives event: "key": "down" is down

    Move:
    Direction:"270" Relative to:"Scene" Move Type:"additive"
    Speed:"300"

    Otherwise:
    Change Attribute: "self.Motion.Linear Velocity.X" to "0"
    Change Attribute: "self.Motion.Linear Velocity.Y" to "0"

    The "Move Up Rule" is the same, but the "direction" in "Move" is at "90" instead of "270"

    Thanks
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    What happens when you take the otherwise contents out completely? (for both up and down)
  • bluebookbluebook Member Posts: 9
    Nothing happened
  • bluebookbluebook Member Posts: 9
    it still only moves up, and stops moving when I let go of the button
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    The down rule does nothing?

    Did you type in "down" or select it from the keyboard that pops up? You can't type it in.
  • bluebookbluebook Member Posts: 9
    I clicked it from the keyboard
  • bluebookbluebook Member Posts: 9
    I clicked it from the keyboard
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    When you are using the Move behaviors, the Change Attributes on the Velocities will not do anything. The Move will be on or off and overpower other movement behaviors.

    So if you just wanted to have your actor move up and down, you can just use the Move behavior.

    Here is how it would work with the combination of keys pressed.
    1) UP key is pressed. DOWN key not pressed. Move will go up.

    2) UP key is released. DOWN key still not pressed. No Movement.

    3) UP key pressed. Then Down key pressed. If the Move behaviors are set to additive, then the movement would stop, assuming both Moves had the same speed. If Move behaviors set to stacked, DOWN would take over and the actor moves down.

    4) UP pressed. Then DOWN pressed. Then DOWN released. Same as 3) but then it moves up.

    5) UP pressed. Then DOWN pressed. Then UP released. Same as 3) but then it moves down.

    etc...

    So depending on what you want to happen based on the order and combination of keys pressed, you would need to customize based on that.
  • bluebookbluebook Member Posts: 9
    It worked, thanks I really appreciate it
Sign In or Register to comment.