Odd interpolate behavior
ColorplayGames
PRO Posts: 69
Hi all!
I'm working on a game right now where I want the bad guys to slowly grow bigger if they are not destroyed by the player, and I'm using Interpolate to handle the scaling. What I've found, however is that they cannot be destroyed (via a simple destroy on overlap/collide with player) until they have reached their maximum size. I'm not quite sure what is causing this problem.
Have other people run into anything similar? Any thoughts on a work-around? I know that I can always use a timer as a back-up but I'd prefer not to since it gobbles resources (from what I've heard anyways).
Thanks for the help!
-Jenna
I'm working on a game right now where I want the bad guys to slowly grow bigger if they are not destroyed by the player, and I'm using Interpolate to handle the scaling. What I've found, however is that they cannot be destroyed (via a simple destroy on overlap/collide with player) until they have reached their maximum size. I'm not quite sure what is causing this problem.
Have other people run into anything similar? Any thoughts on a work-around? I know that I can always use a timer as a back-up but I'd prefer not to since it gobbles resources (from what I've heard anyways).
Thanks for the help!
-Jenna
Comments
I know for the size you need two attributes (X and Y) but I just put size to symbolize that.
I'll go back to using the timer, thanks for your help
I'm using it to do a throbbing effect to enemies. I do not want twenty odd timers eating CPU cycles and Interpolate does the job well but the enemies cannot be killed.
I've just thought that a universal size.attribute could be set up in the game controller but all enemies need to constrain to the new size. All enemies would now throb in unison.
orignal.size - size.attribute could give an offset to use so that the enemies throb away in their own time.
I still need to try it.
the problem is, the collision wasn't working. as if only the image size was interpolated, but not the collision area.
but on this new version it seems that they fixed it. so I'm getting the growing energy ball to collide with the enemies correctly just like when I used timers, but with the advantage of the interpolate, of been much more smooth.