Move actor based on touch on either side of actor...
Hi, I am trying to figure out how to move an actor a way based on which side of the actor you press. For example, if you touch above the actor the actor goes up; if you touch below the actor it goes down.
I have implemented this rule but it only moves once:
Attribute - game.Touches.Touch 1.Y > self.position.Y
Change Attribute - self.position.Y -to- self.position.Y+50
Is there anything wrong with this rule that I am missing; or is there a better way to do this? Please help, thanks in advance!
I have implemented this rule but it only moves once:
Attribute - game.Touches.Touch 1.Y > self.position.Y
Change Attribute - self.position.Y -to- self.position.Y+50
Is there anything wrong with this rule that I am missing; or is there a better way to do this? Please help, thanks in advance!
Answers
Rule - if touch.1.x < self.position.X
change self.motion.linearVelocity.X to -100
Rule if touch.1.x is > self.position.X
change self.motion.linearVelocity.X to 100
If touch.count = 0 change self.motion.linearVelocity.X to 0
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
When Mouse button is Down
Move to mouse position x and Mouse position Y at a speed of 100
Also it kinda frowned upon to reject peoples answers simple because it did not cover everything you wanted. You just simply reply and state it did not work quite how you are wanting. reject is really more for completely useless replies.