256 Colour Tutorial Part 2(V2.62): Difference between revisions
256 Colour Tutorial Part 2(V2.62) (view source)
Revision as of 05:55, 7 December 2005
, 7 December 2005no edit summary
mNo edit summary |
mNo edit summary |
||
Line 47: | Line 47: | ||
Save the script and compile the game to test it, you'll notice that whenever you press the Space Bar, the colours of the "warping frame" changes, this is due to the shift in colours in the mentioned 14 colour slots. If you keep the Space Bar pressed you'll see a smooth colour rotation animation. | Save the script and compile the game to test it, you'll notice that whenever you press the Space Bar, the colours of the "warping frame" changes, this is due to the shift in colours in the mentioned 14 colour slots. If you keep the Space Bar pressed you'll see a smooth colour rotation animation. | ||
I'm not satisfied with this yet, now I want the water at the centre to fall ''continuously'', what can | I'm not satisfied with this yet, now I want the water at the centre to fall ''continuously'', what can we do now? Again, we can use '''CyclePalette()''', we can use this in the '''repeatedly_execute()''' or the '''repeatedly_execute _always()''' events for the continuous motion. Now, check back the background, note that the waterfall was carefully drawn using colours ''mostly'' from slot 208 through 215. I want the animation to play without ''any'' interruptions, so I add the following into the room script: | ||
function repeatedly_execute_always() { | function repeatedly_execute_always() { | ||
CyclePalette(208, 215); | CyclePalette(208, 215); |