rune
Burger Head
Posts: 22
|
Post by rune on Nov 30, 2019 19:48:36 GMT -5
Hi everyone, A very simple question. I would like to make the effect of a sprite flash your image or a text appear flashing. Ex: a press start instruction
Thanks
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 1, 2019 9:30:33 GMT -5
a = AddSprite(1,1) PropSprite a,1,0 ax = 200 ay = 200 While 1 counter++ If counter = 5 Then MoveSprite a,ax,ay If counter = 10 Then MoveSprite a,0,0 counter = 0 End If Sleep 1 Wend
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 1, 2019 9:32:10 GMT -5
I was going to edit the post above, but it got messy when I tried.
Anyway, I used the ax and ay variables in case you wanted to add in a flicker effect to a moving sprite. If the flickering sprite is always going to be static, you can just hardcode the values.
|
|
|
Post by tiberiyltim on Dec 1, 2019 14:11:28 GMT -5
If the AI of the enemies reacts to the player’s coordinates (X/Y), then it’s better:
a = AddSprite(1,1)
PropSprite a,1,0 ax = 200 ay = 200 MoveSprite a,ax,ay
While 1
counter++ If counter = 5 Then PropSprite a,1,0 End If
If counter = 10 Then PropSprite a,300,0 counter = 0 End If
Sleep 1
Wend
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 3, 2019 7:44:59 GMT -5
If the AI of the enemies reacts to the player’s coordinates (X/Y), then it’s better:
The variables ax and ay already contain the sprite coordinates, so your changes are unnecessary, and wouldn't work very well when your VRAM is full.
|
|