Need a way to destroy actor when Interpolating!
beefy_clyro
Member Posts: 5,394
Yellow.
Basically, i have an actor that is interpolating in width and height. I then have another actor which when touch is pressed and overlapping, destroy the interpolating actor.
If you use interpolate to change co-ordinates of the x and y it will destroy, but when interpolating size, it will not detsroy until the conditions are valid and ONCE the interpolating has finished.
Does anyone know a way of achieving/working around this?
Cheers
Basically, i have an actor that is interpolating in width and height. I then have another actor which when touch is pressed and overlapping, destroy the interpolating actor.
If you use interpolate to change co-ordinates of the x and y it will destroy, but when interpolating size, it will not detsroy until the conditions are valid and ONCE the interpolating has finished.
Does anyone know a way of achieving/working around this?
Cheers
Comments
Have you tried change size/grow?
Maybe have a variable that checks if its a certain width and a rule that stops it growing if its over this width?
Hope they fix this soon.
Darren.
An actor will not register the collision unless it's movable so when your other actor is overlapping it doesn't register....think that's right but could be wrong.
Darren.
Tried to change size and it just grows static, doesnt even keep the animation going! This is a real problem as the aim is for the actor to start small and just interpolate bigger. Once it gets to a certain size (the size its interpolating to) it automatically destroys itself. The aim is to destroy the actor before it interpolates to its full size. I need to think of some kind of workaround as this is the core of the game! D'oh!
On a seperate email Darren, could i grab your email, got something i'd like to ask ya?
Thanks
What i have is an invisible actor covering the scene. When you touch this invisible actor it constrains its x and y positions of touch, to other game attributes (game.touchX and game.touchY). I then constrain a different actors x and y to that of the above touch attributes. When you are touching the invisible actor its set to change a boolean value of game.touch to true.
So the interpolating actor has a rule like this;
All
When game.touch = true
When overlapping or colliding with actor2 (for example)
Destroy.
Thats how its setup and then it doesnt let you destroy it until the interpolate has finished
Cheers
Oh and cheers Darren