How to use a Table to animate?
BrainSmash
Member, PRO Posts: 2
Hi GameSalad Community I have been using this wonderful program since February 2013. Trust me when I say I've seen probably every GSHelper video, you tube video and cookbook video as well, more than once. I would first like to extend a humungous Thank you to everybody who made videos or gave advice on the forums or anywhere. My sincerest gratitude to all of the community and the Pros who answer all of the question's whether if it's a repeat or not. Anyway.
I am trying to make a run animation for my man in a side scrolling game. I've got it set up with all the right code in fact I don't even need a table to animate because my animation works fine, however, when my dude jumps off of a wall that he can climb the image doesn't change back to his "stance" image when he touches down on the platforms unless I jump or run left or right to reset his image.
I've found using a "constrain attribute", "Self.image" and a "table cell value" resets his "stance" image perfectly and instantly. So with this logic I want to cycle through a column or row to animate without using "timers" which I've read are heavy on the Processing. I've tried using "Table column count" and "table row count" but I can't seem to figure this one out. Thank you for any advice.
Final note: I tried using Tshirtbooths' "Power of Tables" video for a reference but when he cycles through the words he uses the "random" function. I just need one little tip on how to cycle in order. Thanks again. I LOVE YOU GAMESALAAAAAAD!!!
BrainSmash.
I am trying to make a run animation for my man in a side scrolling game. I've got it set up with all the right code in fact I don't even need a table to animate because my animation works fine, however, when my dude jumps off of a wall that he can climb the image doesn't change back to his "stance" image when he touches down on the platforms unless I jump or run left or right to reset his image.
I've found using a "constrain attribute", "Self.image" and a "table cell value" resets his "stance" image perfectly and instantly. So with this logic I want to cycle through a column or row to animate without using "timers" which I've read are heavy on the Processing. I've tried using "Table column count" and "table row count" but I can't seem to figure this one out. Thank you for any advice.
Final note: I tried using Tshirtbooths' "Power of Tables" video for a reference but when he cycles through the words he uses the "random" function. I just need one little tip on how to cycle in order. Thanks again. I LOVE YOU GAMESALAAAAAAD!!!
BrainSmash.
Best Answer
-
tatiang Posts: 11,949You'll need to create a loop where the counter is game.Row and you set it to 1 and then increment it by one during each iteration of the loop.
See this demo to learn about loops: http://forums.gamesalad.com/discussion/comment/381275/#Comment_381275.New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers