I want an object to dive down, hit something, then return to it's original height before doing it again.
I was originally having it do this by drawing a long thing sprite when it started diving and then having it colide with that off a bounce, but that was making it get lower and lower with each subequent dive because of the thickness of the sprite.
So now I'm trying this with having a variable set itself at the objects y position when it starts the dive, and then checking when it hits a y postion equal to the variable to stop it, but it's not doing anything and I'm not sure why?
imgur.com/a/A2eWc