Changing restitution problem
Hi GS Guys, i got a problem with changing the restitution of my actor, its original restitution is set to "0", so i want it change its restitution and image in a specific point of the game, so i created a boolean game attribute called "bounce" and a rule in the actor that says:
When bounce is true:
Change Attribute: self.Physics.restitution to 1
Change Image: Blah blah
Then a put a button actor with a rule:
When touch inside:
Change Attribute: game.bounce to true
But it doesn't work, sure i did something wrong, if anybody could tell if it's Ok or Wrong, or another way to do it, i would be happy
Thanks
When bounce is true:
Change Attribute: self.Physics.restitution to 1
Change Image: Blah blah
Then a put a button actor with a rule:
When touch inside:
Change Attribute: game.bounce to true
But it doesn't work, sure i did something wrong, if anybody could tell if it's Ok or Wrong, or another way to do it, i would be happy

Thanks
Best Answer
-
simo103 Posts: 1,331
@iTopGames .. you can't change the Physics during gameplay so you will need to be creative to come up with the effect you want. One way would be to spawn a duplicate actor with restitution =0 and destroy the original actor.
Answers