I want to make something like the skimmer sequence from SQ1 and for once I thought I'd ask for advice BEFORE I went off half-cocked and did it wrong and had to kludge it back to normalcy.
My assumptions are I'd:
use screen backgrounds to animate the background going by
put something in the keypress section of global that left and right arrows move the skimmer if in that room
disable the function that makes a repeat directional press stop movement for that room only
give the skimmer a 1 frame walk cycle for when it's drifting each way
Use room scaling to make the obstacle objects grow appropriately as they move down the screen
Rather than object move commands, use a frame counter in the room's execute-always to move the obstacles down so their speed can increase as they get closer
use the collision check function for, well, collision checking
I get anything wrong?
Basically yes, however you can add
function on_key_press(eKeyCode key) {
...
}
to the room script. AGS will call it before the global one. When a key was handled by this room function, you'd usually call ClaimEvent(), this prevents the global one from also processing the key.
If the player movement is handled by a module you have to disable the module in room_Load, otherwise the module script will process the key first.