Fixing in place a full screen object

Started by shaun9991, Mon 15/12/2014 15:32:30

Previous topic - Next topic

shaun9991

Hi guys,

I'm playing around with rain animations. I have a walkable screen which is massive, something like 2000 x 800. The game resolution is 640x400. Is it possible to overlay a transparent object that is animating (rain), and have this fixed to cover the screen wherever the player is walking around? Does that make sense? Any help is much appreciated. I'm guessing it's something for repeatedly execute but I can't seem to get it right.

Thanks,

Shaun
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

Crimson Wizard

#1
Maybe just use transparent non-clickable GUI to draw rain over?

shaun9991

Of course :)

Thank you very much Crimson Wizard!

Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

Crimson Wizard

On other hand, I could be missing some drawbacks. I do not make games much :(.

As for the object, it should be fairly simple too:

Code: ags

function repeatedly_execute_always()
{
   oRain.X = GetViewportX();
   oRain.Y = GetViewportY();
}

Calin Leafshade

The origin of Objects is the bottom left. So you the Y coord would be GetViewportY() + System.ViewportHeight

shaun9991

Thanks guys, both of these work perfectly :)
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

SMF spam blocked by CleanTalk