Reset a Actor Help
kajuto
Member Posts: 314
Hi there!!! i recently trying to reset a Actor but it won't stay put in his position, here what i did...Thanks in advance of course!
When Ball Actor collide with Wall Actor it trigger the 3rd Actor called: Move Actor
Move Actor
Rule#1:
Att. Game.TriggerCollide is true
Timer- after 1 second
Accelerate- direction 290.703 relative to: Scene and Acceleration: 75
Rotate- Direction: Clockwise and Speed: 25
Rule#2:
Att. Game.Reset (real att) is True
change att
- self. position.X to self.X
change att
-self. position.Y to self.Y
change att
-self.motion.linear.velocityX to 0
change att
-self.motion.linear.velocityY to 0
change att
-self.motion.angular.velocity to 0
Rule#3:
change att
-self.X to self.PositionX
change att
-self.Y to self.PositionY
Restart Actor:
Rule#1:
Touch is Pressed
change att
- game.Reset to True
-Reset Scene Behavior
Rule#2:
att game.Reset is True
- Timer after 1sec and Run to completion
- change att
- game.Reset to False
Every time i reset the scene all came back to his original position, except for the Move Actor, every time when he reset, he came back to his original position but KEEP accelerating to the destination X and Y values where i set him to go.
When Ball Actor collide with Wall Actor it trigger the 3rd Actor called: Move Actor
Move Actor
Rule#1:
Att. Game.TriggerCollide is true
Timer- after 1 second
Accelerate- direction 290.703 relative to: Scene and Acceleration: 75
Rotate- Direction: Clockwise and Speed: 25
Rule#2:
Att. Game.Reset (real att) is True
change att
- self. position.X to self.X
change att
-self. position.Y to self.Y
change att
-self.motion.linear.velocityX to 0
change att
-self.motion.linear.velocityY to 0
change att
-self.motion.angular.velocity to 0
Rule#3:
change att
-self.X to self.PositionX
change att
-self.Y to self.PositionY
Restart Actor:
Rule#1:
Touch is Pressed
change att
- game.Reset to True
-Reset Scene Behavior
Rule#2:
att game.Reset is True
- Timer after 1sec and Run to completion
- change att
- game.Reset to False
Every time i reset the scene all came back to his original position, except for the Move Actor, every time when he reset, he came back to his original position but KEEP accelerating to the destination X and Y values where i set him to go.
Answers
Hi @kajuto
Personally I've never been able to find a way to successfully stop an Accelerate behaviour. Even with Drag added, the actor will still "twitch" a bit. I'd be interested to know how any other member has successfully done this...
One solution would mean not having the accelerate aspect to the actor, just moving at a constant speed; if that's OK, then replace your Accelerate behaviour with self.Motion.Linear velocity.x (and y) adjusting the speed of both to get the required angle you want the actor to move in.
Then to stop it, set self.Motion.Linear velocity.x and self.Motion.Linear velocity.y to 0 and it'll stop.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS