FaceDirection doesn't works with flipped sprites [false]

Started by valter, Tue 17/11/2015 14:23:08

Previous topic - Next topic

valter

I don't know if we can call it bug but by creating a view of the character using "Flip Sprite" FaceDirection not working properly.
It's necessary to use existing sprites for each loop and FaceDirection will be fine.

[edit]
To be precise behavior is strange.
I had the loop Left, Left-Up and Left-Down mirrored.
Asking AGS perform FaceDirection(eDirectionUpRight) (this loop was not mirrored) was displayed eDirectionDownRight...
So I proceeded to mirror all frames manually and import them directly as sprite and assign them to the corresponding loop.
Now all directions work properly.

Monsieur OUXX

Quick analysis: I suspect that there are equal chances that this is caused by a bug or by a human mistake while handling the views.
Could you upload your poject to Dropbox or any other hosting site, so that we can have a look? (strip it from any secret contents if you want, first)
 

MiteWiseacreLives!

Facedirection is meant to change the character loop, to select one of the existing loops and set up for an animation. Not meant to create loops.

Monsieur OUXX

#3
Quote from: MiteWiseacreLives! on Tue 17/11/2015 15:57:14
Facedirection is meant to change the character loop, to select one of the existing loops and set up for an animation. Not meant to create loops.
At first I read the same as you (missing loops), but all he said is that he did create those loops, by mirroring the other ones.
 

valter

Quote from: Monsieur OUXX on Tue 17/11/2015 16:10:29
but all he said is that he did create those loops, by mirroring the other ones.

Yes, it is.
However I was not convinced and I created a new base game.
I put in it two characters, one with all the sprites for the eight directions and the other with three loops mirrored.
Then I used FaceDirection for all eight directions and both characters have all of their frames to the right place.
So the problem is in my code ... but it's strange, I'll try to understand.
At the end of the path I simply apply FaceDirection according to the mouse position, anything so complicated ...
Thank you all

Cassiebsg

Quote
At the end of the path I simply apply FaceDirection according to the mouse position

Oh, this reminds me of a problem I had when coding my backpack that can be dropped at mouse coordinates...
I had to change the order of the code, cause otherwise (and assuming that like me, you click one place, but continue to move the mouse after clicking), my code was then dropping not where I clicked but where the mouse was when it processed the mouse coordinates. Could it be that? Try re-arranging your code, or clicking and not move the mouse after you clicked.
There are those who believe that life here began out there...

valter

Thank you for your answer.
Unfortunately my case is different because I put the mouse coordinates in the variables at the beginning of my function.
I readjusted the code and now it works fine even with the character that has mirrored the loop.
I think the problem was in a piece of code where the walk of the character was eNoBlock. Calling FaceDirection occurred before the end of the walk then the frame was displayed during the walk and not at the end.

SMF spam blocked by CleanTalk