recycling animation's images

Recently i was thinking about how to use images for my animation in more efficient way. Since my player's animation has like 60 frames one way, it would be quite a saving. The trick i use will work for horizontal animations, i.e. running character or something that is not vertically symmetrical, thus needing two images for left and right frame of the same action type.
What i did:
- firstly i created game attribute (text, with default value: right) that stores player's current facing direction
- secondly, in the animated actor i created two rules: that change attribute game.playerFacing depending on key presses (in my case they are arrow keys, but you can use whatever you need)
- thirdly i change attribute: self.Graphics.Flip Horizontally to TRUE or FALSE (Flip Horizontally is a built in boolean attribute, so there is no need to create it - every actor has it by default) depending on playerFACINg.
I hope that you understood what i'm trying to say, i'm not and never will be as good as TSB in explaining stuff, but i attach project file, so you can see yourself.
I know that probably its nothing new to experienced GSers but it works for me very well, if you got any suggestions i will appreciate
anything that will help us all to make better apps.
OFF topic.
I can't find any info in cookbook (google doesn't help either) what for and how to use
DRAG and ANGULAR DRAG attributes, that are in every actor's default attribute list under 'Physics'
Thanks in advance for any help and feedback.
What i did:
- firstly i created game attribute (text, with default value: right) that stores player's current facing direction
- secondly, in the animated actor i created two rules: that change attribute game.playerFacing depending on key presses (in my case they are arrow keys, but you can use whatever you need)
- thirdly i change attribute: self.Graphics.Flip Horizontally to TRUE or FALSE (Flip Horizontally is a built in boolean attribute, so there is no need to create it - every actor has it by default) depending on playerFACINg.
I hope that you understood what i'm trying to say, i'm not and never will be as good as TSB in explaining stuff, but i attach project file, so you can see yourself.
I know that probably its nothing new to experienced GSers but it works for me very well, if you got any suggestions i will appreciate
anything that will help us all to make better apps.
OFF topic.
I can't find any info in cookbook (google doesn't help either) what for and how to use
DRAG and ANGULAR DRAG attributes, that are in every actor's default attribute list under 'Physics'
Thanks in advance for any help and feedback.
Comments
http://forums.gamesalad.com/discussion/34363/whats-drag-and-angular-drag-used-for
(you would have thought the simple task of getting a short definition for all the attributes into the cookbook would have been the one of the first jobs for the cookbook ... but aaah well .... )
lol i would never guess what do they mean... I don't want to complain too much since i use free version of GS and its so cool app, but c'mon such a basics should be explained in cookbook in the first place, who cares about layout of website when there is no content in it...