Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:47 22 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Sprite Collition Error

Author Message
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 537
Posted: 11:25pm 09 Nov 2023
Copy link to clipboard 
Print this post

Hello

I'm having trouble to create a new sprite from inside a collision detection sub called by the collision interrupt. I don't know if it is a bug or a limitation on how the sprite's collision interrupt works.

When I try to create a new sprite from inside the sub the SPRITE(C,0,id) function ends with the error "2 is invalid (valid is 1 to 0)"

I'm uploading a test code. You can move the number 1 sprite using the arrow keys. The error happens when the sprite 1 collides with the sprite 2.

t.bas.zip

Thanks
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025