When the player collides with my enemy the enemy moves. I tried to turn off collision with setSpriteCollideBit but it didn't work. I set the player to collide bit 3 and not to collide with 4. I set the enemy to collide bit 4 and not to collide with 3. Thanks for the help. Here is some code:
player:
walkSwordmanI = loadImage("people/walkingSwordMan.png")
walkSwordmanS = createSprite(walkSwordmanI)
setSpriteAnimation(walkSwordmanS,96,96,64 )
setSpriteOffset(walkSwordmanS, 48,48)
SetSpriteScaleByOffset ( walkSwordmanS ,1 , 1 )
setSpritePositionByOffset (walkSwordmanS, resolutionOffsetX,resolutionOffsetY)
setSpriteDepth (walkSwordmanS,5)
setSpriteShapeBox(walkSwordmanS, -20,-36,20,38,0)
setSpritePhysicsOn (walkSwordmanS, 2)
playSprite(walkSwordmanS, 1, 0, 33, 33)
setSpritePhysicsCanRotate(walkSwordmanS,0)
setSpriteCollideBit(walkSwordmanS, 4, 0)
setSpriteCategoryBit(walkSwordmanS, 3, 1)
Here is the enemy:
gtwI = loadImage("enemies/gtw.png")
gtwS = createSprite(gtwI)
setSpriteAnimation(gtwS,96,96,64 )
setSpriteOffset(gtwS, 48,48)
SetSpriteScaleByOffset ( gtwS ,1 , 1 )
setSpritePositionByOffset (gtwS, 100,500)
setSpriteDepth (gtwS,5)
setSpriteShapeBox(gtwS, -20,-36,20,38,0)
setSpritePhysicsOn (gtwS, 2)
setSpriteCollideBit(gtwS,3, 0)
playSprite(gtwS, 1, 0, 33, 33)
setSpritePhysicsCanRotate(gtwS,0)
setSpriteCategoryBit(gtwS, 4, 1)