I suppose you also posted this topic in the new SBS as well. You can assign variables and functions specific to a sprite using SPVAR and SPFUNC.
SPSET 0,0: SPOFS 0,200,125 SPVAR 0,”HEALTH”,10 SPVAR 0,”NAME”,”Strawberry” SPFUNC 0,”TEST” LOOP CALL SPRITE VSYNC ENDLOOP DEF TEST VAR I=CALLIDX() VAR HP=SPVAR(I,”HEALTH”) VAR NAME$=SPVAR(I,”NAME”) LOCATE 0,0:?NAME$+” HP:”;HP;” “ IF BUTTON(1,#B_RRIGHT,2) THEN BEEP 0:DEC HP SPVAR I,”HEALTH”,HP ENDIf this works (I have not tested this), text should appear at the top of the screen with a number that decreases every time you tap the A button. The function TEST is assigned to sprite 0. The CALL SPRITE function runs through every sprite function (in this case, “TEST” is constantly called because it is assigned to the strawberry sprite). This isn’t a direct answer to your problem but I hope it can point you in the right direction.