• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML hiding objects while scrolling

F

Farouk

Guest
Hi everybody

i am creating a store tab that pops up on the screen of my andriod Game

when i scroll down the store i want the objects that cross a certain height , let's say y=100, dissapear

but the trick is, i want only the part of the object going below the y=100 dissapears and not the whole object

is there a way to do that?

i am totally open to any way to do the scrolling part so that i hide the parts of objects beyond a certain Y
 

obscene

Member
You should use a surface to make your store window. You can draw everything as normal but just change it's y position. Anything drawn off the edge of the surface is essentially cropped. Then draw the surface at a fixed position.
 

Xer0botXer0

Senpai
Store back ground
Store foreground
Store items

Store items have a lower depth than store BG and higher than store FB, when you scroll the store items will do as you describe.
 
F

Farouk

Guest
Thanks for the responses everybody, surface is the solution!
depth wont work because of the way the objects are laid out, parts of the other objects will still be visible

thank you all again
 
Top