R
Rhadamanthe
Guest
Hi everyone !
I post here, because I've a big and mysterious issue!
I want to change a sprite for a blood effect, according to my player orientation (left, right, up, down).
I have my sprites in arrays, because it changes according to ennemies.
So I tried two ways :
- I put my sprite attack of my character in the same order than the blood sprite in the arrays. So, when I create the instance of the blood effect, I call the 2D array, the first entry is an id of the ennemies, second is the sprite index of my character.
- I set a variable from 0 to 3, when I change my character sprite for attack. And it's suppose to be the same than the second entry of my 2D array.
Ok, so, it works, but only in my first room !!
When I go to the second, in both ways, the value is 0. But nothing change between the first and second room ...
If someone has a magic trick to resolve that ... Thank you in advance
I post here, because I've a big and mysterious issue!
I want to change a sprite for a blood effect, according to my player orientation (left, right, up, down).
I have my sprites in arrays, because it changes according to ennemies.
So I tried two ways :
- I put my sprite attack of my character in the same order than the blood sprite in the arrays. So, when I create the instance of the blood effect, I call the 2D array, the first entry is an id of the ennemies, second is the sprite index of my character.
- I set a variable from 0 to 3, when I change my character sprite for attack. And it's suppose to be the same than the second entry of my 2D array.
Ok, so, it works, but only in my first room !!
When I go to the second, in both ways, the value is 0. But nothing change between the first and second room ...
If someone has a magic trick to resolve that ... Thank you in advance