You could do something like this for example:
Make a view with each loop containing a different animation of a rain drop falling down, then:
[code]
// room script file
#define RAINDROP_AMOUNT 100 // number of rain drops to draw
#define RAINDROP_VIEW 21 // view number containing animation loops
#define RAINDROP_ANIMDELAY_MIN 5 // animation speed will be randomized between these two values
#define RAINDROP_ANIMDELAY_MAX 20
struct RainDrop {
int loop; // stores current loop
int frame; // stores current frame
int framedelay; // stores delay until next frame
int animationdelay; // stores overall animation speed
int x; // stores x-location
int y; // stores y-location
};
RainDrop raindrops[RAINDROP_AMOUNT];
function room_a() {
// script for room: Player enters screen (before fadein)
RawSaveScreen(); // save default (clean) background frame
}
function repeatedly_execute_always() {
RawRestoreScreen(); // restore clean background frame
int dropid = 0; // start with first drop
while (dropid < RAINDROP_AMOUNT) { // loop for each drop
if (raindrops[dropid].framedelay) raindrops[dropid].framedelay--; // if delay until next frame has not elapsed, decrease it
else { // if delay until next frame has elapsed
if (raindrops[dropid].frame >= GetGameParameter(GP_NUMFRAMES, RAINDROP_VIEW, raindrops[dropid].loop, 0)) // if animation has finished
raindrops[dropid].frame = 0; // go to first frame
if (raindrops[dropid].frame == 0) { // if at first frame (new animation)
raindrops[dropid].loop = Random(GetGameParameter(GP_NUMLOOPS, RAINDROP_VIEW, 0, 0) - 1); // randomly select new loop from rain drop view
raindrops[dropid].animationdelay = RAINDROP_ANIMDELAY_MIN + Random(RAINDROP_ANIMDELAY_MAX - RAINDROP_ANIMDELAY_MIN); // randomize overall animation speed
raindrops[dropid].x = Random(game.room_width); // randomize x-location
raindrops[dropid].y = Random(game.room_height); // randomize y-location
}
raindrops[dropid].framedelay = raindrops[dropid].animationdelay + GetGameParameter(GP_FRAMESPEED, RAINDROP_VIEW, raindrops[dropid].loop, raindrops[dropid].frame); // set delay until next frame
raindrops[dropid].frame++; // go to next frame
}
RawDrawImage(raindrops[dropid].x, raindrops[dropid].y, GetGameParameter(GP_FRAMEIMAGE, RAINDROP_VIEW, raindrops[dropid].loop, raindrops[dropid].frame - 1)); // draw rain drop on background
dropid++; // loop to next drop
}
}
[/code]
Or you could use a single image and automatically draw it resized with RawDrawImageResized. I can whip something up later if you're interested.