256 Colour Tutorial Part 2(V2.62): Difference between revisions
256 Colour Tutorial Part 2(V2.62) (view source)
Revision as of 05:53, 7 December 2005
, 7 December 2005no edit summary
mNo edit summary |
mNo edit summary |
||
Line 39: | Line 39: | ||
[[Image:8bittut_dizzypalcp.png]] | [[Image:8bittut_dizzypalcp.png]] | ||
Whenever the function CyclePalette(240, 253) is | Whenever the function CyclePalette(240, 253) is executed, the colours in these slots are shifted to the left by one slot, and the original colour in the first slot (#240) will be warped to the last slot (#253). | ||
Now, let's decide where to put this code in, for example, I want it to happen whenever I press the Space Bar, so I type this into the room script: | Now, let's decide where to put this code in, for example, I want it to happen whenever I press the Space Bar, so I type this into the room script: | ||
function on_key_press(int key) { | function on_key_press(int key) { |