Odd interpolate behavior

ColorplayGamesColorplayGames PRO Posts: 69
edited November -1 in Working with GS (Mac)
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

Comments

  • VoidedSkyVoidedSky Member Posts: 1,095
    The "linear" changing of size isn't considered a physics function. but you could do: Timer; every .4 seconds change size to size+1. or something like that.

    I know for the size you need two attributes (X and Y) but I just put size to symbolize that.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    there is a change size behavior that we've been told now changes the collision area as well as the image. Haven't tried it yet but should work with a timer.
  • ColorplayGamesColorplayGames PRO Posts: 69
    Ok, let me make sure I'm understanding the distinction here.. if something is a physics function, then other calculations/changes/whatever can take place at the same time, but if it's not a physics function, then they can't?

    I'll go back to using the timer, thanks for your help :)
  • netdzynrnetdzynr Member Posts: 296
    Maybe the actor cannot be destroyed until the interpolate is completed? You might try breaking up your interpolates into smaller (shorter) units of time, allowing them to complete more often, along with a timer, as CowTech suggests.
  • ValanValan Member, BASIC Posts: 410
    I've got the exact same problem.

    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.
  • nulonulo Member Posts: 315
    just when the interpolate behavior was added, i started using it instead of timers for my characters attack (a growing energy ball)
    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.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I have used interpolate with moving bad guys and collisions seem to work so far.
Sign In or Register to comment.