English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 10 January 2017, 02:39   #1
Shatterhand
Warhasneverbeensomuchfun
 
Shatterhand's Avatar
 
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
and another point in the same loop I do


Code:
SetColl 1,3,1
DoColl
If PColl (2) = -1
   collision code
endif
but this does not work.

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?
Shatterhand is offline  
Old 12 January 2017, 18:51   #2
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
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.
Lonewolf10 is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:02.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10372 seconds with 13 queries