10 January 2017, 02:39 | #1 |
Warhasneverbeensomuchfun
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
|
SetCol/DoColl-How to test collisions with different sprites against different colors?
in my game I have a sprite I want to test the collision against color 1 of the bitmap, and other one I want to test against color 3 of the bitmap.
so at one point of the main loop I do this: Code:
SetColl 3,3,1 DoColl If PColl (0) = -1 collision code endif Code:
SetColl 1,3,1 DoColl If PColl (2) = -1 collision code endif If I do just one DoColl on the main loop, it works with the first color I set for the collision. If I execute two DoColl on the same loop, nothing works, none of the collisions are tested at all. Any ideas? |
12 January 2017, 18:51 | #2 |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
I'm not a Blitz coder, but are you sure the SetColl values are correct? If they are then are the collision checks executed in the same frame (e.g. between Vbl's)?
I guess that using SetColl (or DoCall) resets all previous collision detections to false, but I don't understand why both collision checks fail. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
My colors are messed up in OS 3.9 | VoltureX | support.Apps | 2 | 27 June 2013 09:21 |
[REQ:ASM] Sprite collisions basics | jman | Coders. Tutorials | 5 | 03 September 2011 00:07 |
CD32 Frog Feast test available. Test out the final! | cdoty | News | 42 | 01 April 2008 16:20 |
Disable Sprite Collisions | DeAdLy_cOoKiE | Retrogaming General Discussion | 4 | 24 March 2006 17:56 |
Using 256 colors | sence2001 | support.Apps | 0 | 02 October 2004 21:34 |
|
|