GLBasic forum

Main forum => Bug Reports => Topic started by: ampos on 2011-Jan-13

Title: Help with "bug" in animcoll, Gernot.
Post by: ampos on 2011-Jan-13
It seems that the reason my program crashes is due to ANIMCOLL.

I need to check collision between a non-anim sprite and an animated sprite, so I used:
(brick is the animated sprite)

col=animcoll(ball,0,xb,yb,brick,xbr,ybr)

at first I though that the error is because using frame 0 as frame for the non-anim sprite, and changed to 1. It seems to work for a while, but again it crashes again.

Can a non-animated sprite used in animcoll?

I would try to change the sprites, so to sent as first param the anim sprite and the 2nd the non-anim, but I think it will no be the solution.

should I change the ball into an anim sprite to avoid the error?
Title: Re: Help with "bug" in animcoll, Gernot.
Post by: MrTAToad on 2011-Jan-13
Animated and non-animated sprites can be used with ANIMCOLL - the non-animated sprite should have an tile1 or tile2 value of 0
Title: Re: Help with "bug" in animcoll, Gernot.
Post by: Kitty Hello on 2011-Jan-13
Make a reproducible example, please.
Title: Re: Help with "bug" in animcoll, Gernot.
Post by: ampos on 2011-Jan-13
Quote from: Kitty Hello on 2011-Jan-13
Make a reproducible example, please.

Buff, I will try.

As few test has been done, ANIMCOLL has a bug. I have changed ANIMCOLL with SPRITECOLL and got no crashes.

If you want to check something, I am using coordinates with decimals, .types, around 30 collision detections per frame.
Title: Re: Help with "bug" in animcoll, Gernot.
Post by: MrTAToad on 2011-Jan-13
Trouble is, we need to see your code :)
Title: Re: Help with "bug" in animcoll, Gernot.
Post by: Kitty Hello on 2011-Jan-13
You can email it to me, if you have a way to really reproduce it.
Title: Re: Help with "bug" in animcoll, Gernot.
Post by: ampos on 2011-Jan-13
I will sent later from home.

They way to reproduce it is playing. If in 1 minute it did not crash, stop, F5 and try again.