Maybe something like this:
// set up player sprite
i_player = CreateSprite(<some image>)
<other player sprite setup>
// set player to interact with category 1, use the same category
// for all scenery so that player bounces
SetSpriteCollideBit(i_player,1,1)
// make the sprite react to its environment dynamically
SetSpritePhysicsOn(i_player,2)
// set up enemy sprite
i_enemy = CreateSprite(<some image>)
<other player sprite setup>
// set enemy to interact with category 1
SetSpriteCollideBit(i_enemy,1,1)
// make the sprite react to its environment dynamically so that
// it won't fall through the floor
SetSpritePhysicsOn(i_enemy,2)
// other game setup, including making sure gravity is on
// start the game
<do stuff>
do
// check for player/enemy collisiton
if GetSpriteCollision(i_enemy,i_player)
// disable interaction with enemy
SetSpriteCollideBit(i_enemy,1,0)
// do other things for interaction
endif
// other game stuff
sync()
loop
Naturally, you can use arrays of enemies. But the idea is to initially set the bits so that the two sprites will interact initially.
Once they collide, the collision category is turned off for the enemy. Since it is initially set to the same category as the walls, floors and other objects, it will stay in place. But once it's set so that it won't collide with the other objects in the category, it should fall through them all and collisions with the player won't register.
I could be wrong. I haven't tested this. It is based on reading the descriptions of the commands.
Cheers,
Ancient Lady