Editing Creating a simple decoration
From Eternity Wiki
Jump to navigationJump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 44: | Line 44: | ||
Let's say, though, that we feel this Cacodemon lamp is just not interesting enough yet and want to make it animate. Leaving the thingtype definition alone, we can modify its frames to put it into a looping animation sequence. I've added a commented header line at the top, for clarity. The spacing is just for the sake of matching up the commented header with the fields, and is not actually necessary to the code. | Let's say, though, that we feel this Cacodemon lamp is just not interesting enough yet and want to make it animate. Leaving the thingtype definition alone, we can modify its frames to put it into a looping animation sequence. I've added a commented header line at the top, for clarity. The spacing is just for the sake of matching up the commented header with the fields, and is not actually necessary to the code. | ||
// Sprite | Frame | Bright | Duration | Action | Next Frame | |||
frame CACOLAMP_A { cmp = "HEAD | A | * | 6 | * | @next" } | frame CACOLAMP_A { cmp = "HEAD | A | * | 6 | * | @next" } | ||
frame CACOLAMP_B { cmp = "HEAD | B | * | 6 | * | @next" } | frame CACOLAMP_B { cmp = "HEAD | B | * | 6 | * | @next" } | ||
frame CACOLAMP_C { cmp = "HEAD | C | T | 6 | * | @next" } | frame CACOLAMP_C { cmp = "HEAD | C | T | 6 | * | @next" } | ||
frame CACOLAMP_D { cmp = "HEAD | D | T | 12 | * | @next" } | frame CACOLAMP_D { cmp = "HEAD | D | T | 12 | * | @next" } | ||
frame CACOLAMP_E { cmp = "HEAD | C | T | 6 | * | @next" } | frame CACOLAMP_E { cmp = "HEAD | C | T | 6 | * | @next" } | ||
frame CACOLAMP_F { cmp = "HEAD | B | * | 6 | * | CACOLAMP_A" } | frame CACOLAMP_F { cmp = "HEAD | B | * | 6 | * | CACOLAMP_A" } | ||
This frame sequence will cause our CacoLamp to cycle through its sprite frames A through D and back again, looping back to the original frame, CACOLAMP_A, when it's done. | This frame sequence will cause our CacoLamp to cycle through its sprite frames A through D and back again, looping back to the original frame, CACOLAMP_A, when it's done. | ||