View Single Post
Old 02 February 2018, 01:10   #15
adrazar
Registered User
 
Join Date: Feb 2017
Location: Oslo
Posts: 90
This is a way to make Bobsprite Col work on a scrolling screen (assuming Bob Update has been turned off): Move the bob with the following instruction

Bob N,X Bob(N)-XOFFSET,Y Bob(N)-YOFFSET,

right before doing Bobsprite Col(N). Bobsprite Col(N) will now be True when a collision has occured. When the collision handling is done, the bob should be moved back in place:

Bob N,X Bob(N)+XOFFSET,Y Bob(N)+YOFFSET,


The same trick can also be used for Spritebob Col, now assuming Sprite Update is turned off:

Sprite 8,X Sprite(8)+XOFFSET,Y Sprite(8)+YOFFSET,
If Spritebob Col(8) Then ...
Sprite 8,X Sprite(8)-XOFFSET,Y Sprite(8)-YOFFSET,

(I've been struggling with Bobsprite/Spritebob Col recently, and found this thread while looking for guidance online.)
adrazar is offline  
 
Page generated in 0.04301 seconds with 11 queries