use above post code, work correctly for Player and Enemy but when I remove this line
GetSpriteXByOffset(Boss.spr), Boss character can be move to direction but make change Boss.x position to 0. while i set Boss.x Position to 80 in CreateBoss() Command.
CreateBoss() :
Function CreateBoss()
//Load Images
SetFolder("\media\images\boss")
for a = 1 to 4
BImageName$ = "anim" + str(a) + ".png"
if GetImageExists(BossImg[a]) = 0 then BossImg[a] = LoadImage(BImageName$)
next a
//Create Sprite
if GetSpriteExists(EmptySpr) = 1
if GetSpriteExists(Boss.spr) = 0
Boss.spr = CloneSprite(EmptySpr)
SetSPriteVisible(Boss.spr,1)
SetSpriteSize(Boss.spr,11.71875,-1)
SetSpriteOffset(Boss.spr,GetSpriteWidth(Boss.spr)/2,GetSpriteHeight(Boss.spr)/2)
SetSpritePositionByOffset(Boss.spr,80,72.5)
SetSpriteImage(Boss.spr,BossImg[1])
SetSpriteAnimation(Boss.spr,150,200,6)
PlaySprite(Boss.spr,10,1,1,6)
endif
endif
EndFunction