So I am trying to change sprite colors if another sprite is in its same position, the second sprite has nothing to do with the first other then its pos/
This is how I am choosing that sprite to change color, if the positions are the same, if they mach then the sprites color changes.
I am using this here that I changed a lot to get it to work and it well, works about 90 percent of the time.
note. the sprites I am matching positions with are deleted after the color change so I think this might be the case but I added a tween delay and noticed it is now about 95 percent working. As in the colors change about 90 percent. Here and there the sprites do not change, and well, they should, there is no reason for them not to other then AppGameKit is not very accurate. There is nothing at all holding them from changing colors. Other then one, and this could be some how the other sprites are not at the same positon, but there being placed in the same spots.
Any help or advice would be well, appreciated.
if CollectingAnimals=0
for A=backgrounds.length to 0 Step -1
backgrounds[A].Sprite_X# =GetSpriteXByOffset(Item.SpriteID)
backgrounds[A].Sprite_Y#=GetSpriteYByOffset(Item.SpriteID)
backgrounds[A].posx#=GetSpriteXByOffset(backgrounds[A].ID)
backgrounds[A].posy#=GetSpriteYByOffset(backgrounds[A].ID)
backgrounds[A].Colors=GetSpriteColorAlpha(backgrounds[A].ID)
if backgrounds[A].posx#=backgrounds[A].Sprite_X# and backgrounds[A].posy#=backgrounds[A].Sprite_Y#
//if GetSpriteXByOffset(backgrounds[A].ID)=GetSpriteXByOffset(Item.SpriteID) and
//GetSpriteYByOffset(backgrounds[A].ID)=GetSpriteYByOffset(Item.SpriteID)
if GetSpriteXByOffset(backgrounds[A].ID)=backgrounds[A].Sprite_X# and GetSpriteYByOffset(backgrounds[A].ID)=backgrounds[A].Sprite_Y#
if backgrounds[A].Colors>200
SetSpriteColor(backgrounds[A].ID,255,0,0,200)
inc CountGrid
endif
endif
next A
endif