Creating a Brawler style Game, need help with Player Movement

Hi all! New to GameSalad, and I am trying to make an old school River City Ransom style brawler. (probably should have picked something a little easier to start with, but hey I like the challenge)
So to give you an idea of what I am doing so far, and to make sure I am doing everything so far correctly, this is what I got:
I have the player moving around on X and Y using key board input, and I constrain the player to the specific area of the scene by checking to see if the player is within the gameplay area (basically the ground, don't want the player to be able to run up walls and on buildings that would just be weird), this is achieved by the following:
Player Move Left (I keep the player from moving off the left side of the scene)
Attribute(self.Position.X > 0+self.Size.Width/2)
If this is True I check for keyboard input, and allow the player to move left with the Move Persistent Behavior
Player Move Right (I keep the player from moving off the far end of the scene)
Attribute(self.Position.X < 2400-self.Size.Width/2)
If this is True I check for keyboard input, and allow the player to move right with the Move Persistent Behavior
Player Move Up (I keep the player from moving off the top side of the ground gameplay area, 150 units from the bottom of the screen)
Attribute(self.Position.Y < 150- self.Size.Height /2)
If this is True I check for keyboard input, and allow the player to move up with the Move Persistent Behavior
Player Move Down (I keep the player from moving off the bottom of the scene)
Attribute(self.Position.X > 0+ self.Size.Height /2)
If this is True I check for keyboard input, and allow the player to move up with the Move Persistent Behavior
Now I can't figure out the best way to allow the player to jump, while still being allowed to move around on the ground within the gameplay area, the problem comes in when they player jumps this alters their Y position, which will then register on the Player move up rule and cause problems.
Am I doing the player constraints correctly?
And Does anyone have a good idea as to how to get jumping to work in this style of game?
Thanks in advance!
So to give you an idea of what I am doing so far, and to make sure I am doing everything so far correctly, this is what I got:
I have the player moving around on X and Y using key board input, and I constrain the player to the specific area of the scene by checking to see if the player is within the gameplay area (basically the ground, don't want the player to be able to run up walls and on buildings that would just be weird), this is achieved by the following:
Player Move Left (I keep the player from moving off the left side of the scene)
Attribute(self.Position.X > 0+self.Size.Width/2)
If this is True I check for keyboard input, and allow the player to move left with the Move Persistent Behavior
Player Move Right (I keep the player from moving off the far end of the scene)
Attribute(self.Position.X < 2400-self.Size.Width/2)
If this is True I check for keyboard input, and allow the player to move right with the Move Persistent Behavior
Player Move Up (I keep the player from moving off the top side of the ground gameplay area, 150 units from the bottom of the screen)
Attribute(self.Position.Y < 150- self.Size.Height /2)
If this is True I check for keyboard input, and allow the player to move up with the Move Persistent Behavior
Player Move Down (I keep the player from moving off the bottom of the scene)
Attribute(self.Position.X > 0+ self.Size.Height /2)
If this is True I check for keyboard input, and allow the player to move up with the Move Persistent Behavior
Now I can't figure out the best way to allow the player to jump, while still being allowed to move around on the ground within the gameplay area, the problem comes in when they player jumps this alters their Y position, which will then register on the Player move up rule and cause problems.
Am I doing the player constraints correctly?
And Does anyone have a good idea as to how to get jumping to work in this style of game?
Thanks in advance!
Comments
All the things you've said, you need to make the rules when all conditions are valid and add a condition saying the boolean is true.
For the movement, try different ways. For example, when the boolean is checked, turn on the gravity and the actor accelerates up.
Hope it helps