@SoAGAMES you only need 2 rules and a collide behavior , here is step by step:
1) make an integer self attribute call it jump
2) add a collide behavior with walls
3) You will create a switch whenever the mouse button is down so when the screen is pressed it will change the self.jump integer that we created to either 1 or 0.
create a **_Rule_**
- when actor receives event mouse button is down
change attribute self.jump to mod((self.jump+1),2)
4) Now that the self.jump changes to 1 or 0 whenever the screen is touched , you can easily say that when the jump is = 1 go right and when jump is = 0 go left.
create a **_Rule_**
- when self.jump = 1
change attribute Self.Motion.LinearVelocity.X to 300 otherwise
change attribute Self.Motion.LinearVelocity.X to -300
Comments
Why not just buy the template that is for sale from the video you posted?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@SoAGAMES you only need 2 rules and a collide behavior , here is step by step:
1) make an integer self attribute call it jump
2) add a collide behavior with walls
3) You will create a switch whenever the mouse button is down so when the screen is pressed it will change the self.jump integer that we created to either 1 or 0.
- when actor receives event mouse button is down
change attribute self.jump to mod((self.jump+1),2)
4) Now that the self.jump changes to 1 or 0 whenever the screen is touched , you can easily say that when the jump is = 1 go right and when jump is = 0 go left.
- when self.jump = 1
change attribute Self.Motion.LinearVelocity.X to 300
otherwise
change attribute Self.Motion.LinearVelocity.X to -300
make sure you turn the bounciness to 0
thats it , hope it helps and good luck
>
example