@Brent: yes sir… i use it on widget…
the problem is… how to makes HP not -1 when i meet enemy with attack sprite mode…
i duno how to implemen that function
@Brent: yes sir… i use it on widget…
the problem is… how to makes HP not -1 when i meet enemy with attack sprite mode…
i duno how to implemen that function
Do you want to check if the player’s sprite animation sequence is equal to something (attacking or not attacking) to determine which action to take?
Brent
Hi @kali8pm,
During the collision, you can check which “sequence” is playing by using the “sprite.sequence” property. See here:
https://docs.coronalabs.com/api/type/SpriteObject/sequence.html
Brent
[lua]
local current_sequence = spriteObj.sequence
[/lua]
so i must write this??
[lua]
local attack = spriteObj.sequence
[/lua]
where i must put that code??
sry for my noobnest sir