can someone help? I will explain better what I JohnPapiomitis friend says it works great but there is an error, if I put 3 objects and the ball collides with a single, break the 3 at the same time.
Rupa lo que está sucediendo es que estás usando un atributo global que obviamente afecta a todas. Olvídate de este atributo y utiliza el que pusiste dentro del actor. Lo llamaste counter. En lugar de ser 0 ponle un 2. En este actor vas a poner una regla que diga: Rule When overlaps or collide con greenball (change attribute) change attribute self counter to self counter -1
Entonces vas a poner otra regla que diga: when attribute self counter = 1 change image a la rota
luego vas a poner otra regla que diga: when attribute self counter < o igual que 0 change self position X to -60
LordTarantor said: Rupa lo que está sucediendo es que estás usando un atributo global que obviamente afecta a todas. Olvídate de este atributo y utiliza el que pusiste dentro del actor. Lo llamaste counter. En lugar de ser 0 ponle un 2. En este actor vas a poner una regla que diga: Rule When overlaps or collide con greenball (change attribute) change attribute self counter to self counter -1
Entonces vas a poner otra regla que diga: when attribute self counter = 1 change image a la rota
luego vas a poner otra regla que diga: when attribute self counter < o igual que 0 change self position X to -60
Verifica a ver como te funciona.
lord aqui hace falta mas gente como tu eres grande, funciona perfecto maestro
Comments
--If self.counter = < 2
--Then change self.counter to self.counter+1
--Else destroy
You might want to create the physics manually, to prevent the collisions overwriting your rules.
PLEASE CHECK IMAGE, NOT FOUND
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
First collision - change of image
second collision-destroy
Have a rule in the actor when it overlaps with the other actor change attribute hitcount to hitcount+1
Make another rule when attribute hitcount=1
then put a change image behavior in there
then make another rule when attribute hitcount=2
then put destroy actor in there
Olvídate de este atributo y utiliza el que pusiste dentro del actor. Lo llamaste counter. En lugar de ser 0 ponle un 2. En este actor vas a poner una regla que diga:
Rule
When overlaps or collide con greenball
(change attribute)
change attribute self counter to self counter -1
Entonces vas a poner otra regla que diga:
when attribute self counter = 1
change image a la rota
luego vas a poner otra regla que diga:
when attribute self counter < o igual que 0
change self position X to -60
Verifica a ver como te funciona.