Question about speed decreasing.
CaptainX
Member Posts: 14
Hello there,
I would like to know if it’s possible when I pick up an object the character speed will decrease?
I move the character while pressing on him.
Rule :
Actor receives event : touch : is pressed
Constrain Attribute : self.Position.Y to game.Mouse.Position.Y (I’m using the mouse right now to test the game and the char. only move up and down)
so when I get an object I want to decrease hes speed.... how?
thank you.
I would like to know if it’s possible when I pick up an object the character speed will decrease?
I move the character while pressing on him.
Rule :
Actor receives event : touch : is pressed
Constrain Attribute : self.Position.Y to game.Mouse.Position.Y (I’m using the mouse right now to test the game and the char. only move up and down)
so when I get an object I want to decrease hes speed.... how?
thank you.
Comments
I don't really understand the problem...
if actor is constrained to touch location... then actor's speed is the speed of the user's drag.
Unless you want to offset that.
could you explain in more detail?
MH
I sent you a private message for my problem.
thanks !
In my rule, i've put when the actor overlaps with an object :
change attribute
self.motion.linear velocity.y to game.Speed - 10 (-10 will move slowly down + 10 slowly up) I'm sure this is not good too since I want my character going slowly whenever I decide to move him up or down by touching the screen, right now he's moving by himslef without the player touching him to move...
you could offset the constrain to X or Y by -10 or so... but that doesn't slow it... just follows the moving finger.
MH