Silkc2
So "0 based" simply means that the animated sequences begin with 0 rather than 1 (because when you import frames it begins with 0...then goes to 1,2,etc). Got it.
When you say "if statement" I assume you are referring to the condition where you have an expression that makes a comparison (of =Equal to) to a number "Self.AnimationFrameCount-1" but I am confused when you talk about offsets and checking the last frame...though I have yet to actually encounter an "if" when looking through the system or object events. However, before I dig too much into that I would like to validate my understanding on the function of the even sheet as a whole. Would I be correct in saying the Event Sheet is where the user articulates how and when the imported assets and native objects (to the program) are presented and manipulated upon the execution of the layout? And further, that terms like "if statement" or "Else" and "While" refer to the logic that allows the user to communicate to the program how and in what order those objects should be manipulated? Finally, that the code is read and executed from top to bottom unless a loop is put in that dictates the program repeat some previously dictated action?
*That question may make it look like I know more than I am leading on but that paragraph was the end result of about 20 minutes of research, careful thought and selective phrasing but ultimately is a real set of questions as I have found that often my conclusions are only partly accurate and the component I am missing is vital to a true and accurate understanding of the topic.
The reason I elected to request validation on those things is so that I can have the proper frame of reference for some of your other statements. For example: You say "if my sprite is on frame 2"...does that refer to where the sequence left off during the execution of the events on the event sheet or rather does that refer to where it is set to start in the properties of the sprite object under "initial frame" (or both)?
If you failed to designate to Animationframecount-1=2 would c2 simply continue to try to add frames even though the animation (in your case) consists of a total of 3 frames? Why is it necessary to designate NOT to try to go to frames that do not exist? Or does the "Else" statement serve only to create a loop where the sequence repeats itself indefinitely upon (in this case) an ontouch event?
Finally, when you say "hardcoding" what does that mean and what would your approach be called in programming terms? Dynamic coding? Can you provide a simple example of both methods (or refer me to an example)? Does hardcoding refer to writing a series of events/conditions/expression that facilitates a beginning to end execution of a layout independent of the nature of an object or it's relative complexity (like the number of frames in an animated sprite sequence)?