What it does
sprite.setCollideBits sets CollideBits on a sprite object. It takes id and bits.
Signature
sprite.setCollideBits(id, bits)Arguments
idbits
Example · generated
function start() { const id = sprite.create('/sprites/hero.png', 100, 120); sprite.setCollideBits(id, 1);}sprite.create is there to give the call something to act on; sprite.setCollideBits is the line that matters. The code sits in start(), which the engine calls once, when the entity spawns.