Animate a table image?
As_Of_Latte
Member, BASIC Posts: 343
Can I animate an image that is constrained to a table? Possibly, just by tossing in the animate behavior? I'm not the best with tables
Here is a screenshot of what I'm working with.
Comments
I have no idea if this will work but...
It depends on how many images you want to have as part of the animation.
Let's say you had ten images, and you can reference all of them the same way you did in your screenshot, by referring to the table cell value.
Make a timer.
(this is where it gets slightly complicated...)
if the time =
0.0 (1st image)
0.1 (2nd image)
0.2 (3rd image)
0.3 (4th image)
0.4 (5th image)
0.5 (6th image)
0.6 (7th image)
0.7 (8th image)
0.8 (9th image)
0.9 (10th image)
Then attach a modulus to the time so that when it gets to 1, it'll reset to zero.
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
@Summation Thanks for the quick reply. That does make sense what you're saying! I'll give it a try right now.
Just to add to that, rather than using 10 rules, do:
Timer every 0.3 seconds
Change Attribute self.Item Number Select to mod(self.Item Number Select,10)+1
That will cycle through images 1 to 10, changing the image every 0.3 seconds.
Here's a simple example (I didn't use self.Item Number Select but it wouldn't be difficult to add that in).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Table Master @tatiang ™ to the rescue!
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
@tatiang My mind is blown away... I can't believe how simple you made this and also provided an example project! This is much appreciated, thank you It works great. And thank you for your help as well @Summation
You both have the mind of a jedi ninja, with the ability to see things more clearly
@As Of Latte You're welcome! Believe me, it took a long time to get to this point.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
This may or may not be a forensic sketch of @tatiang
Shhhh! Highly classified!
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
LOL. Well deserved accolades
Another way it could be done is by constraining the actor's image to a clock:
https://forums.gamesalad.com/discussion/63454/fast-frame-swap
The force is strong with you as well @Socks
Thanks!