Hello there, when I deal with the Animation of a spirit, which can head to 4 directions(Left, Right, Up, Down), I got a problem that, must I define all the link one by one manually? For the up direction, I should define the WalkUpLoop, WalkUp2IldeUp, IdleUpLoop, IdleUp2WalkUp, IdleUp2Right, IdleUp2Left, IdleUp2Down as the 4th tutorial do, and for all the 4 directions, there are 8*4=32 links in all, for an 8-direction spirit the number will be even bigger. So, is there any way to make it simple?
Comments
See this thread for info on how to make multi-line lists: https://forum.orx-project.org/discussion/2912
(You'll need to be using the latest version of Orx from svn for this to work, not the 1.3 release version)
As for defining everything manually, some things can be automated in some cases.
For example, if your directions are all behaving the same way, you could prefix everything by the direction itself (such as Left, Right, Up and Down) and create the config info for those directions at runtime, in the Init() callback, for example.
A way to do so, is defining a template for one direction (ie. all the anims/links for one direction), then having a list of directions (the 4 mentioned above), for each of them you replicate that template with the direction as prefix.
Not sure if that makes any sense but here's an example of creating config info at runtime for creating all the frames of one animation without having to write them all manually.
Everytime you're going to write manually config data that could be automated because they share a similar pattern, I'd advise letting the computer do it for you at runtime as it will save you quite some time, be more flexible if you want to add cases and be much less error prone than copy/paste + find/replace.