Player Can't Go Down!!!
bluebook
Member Posts: 9
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
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!
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
Did you type in "down" or select it from the keyboard that pops up? You can't type it in.
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.