Resize and stretch tile sprite and relative position of screen and is there window events?

resize and stretch tile sprite and relative position of screen

anchor behavior seem to do what i want but the actually x position and how it expand is visible on the screen… it don’t stay.

I have a tile sprite that i use as a border for the top and bottom of the screen. I want to anchor the position and resize relative to the screen size; so if the screen width is 300 and user expand to 600 i want the tile sprite to expand to 600.

When i try to do this with anchor it seem like it almost possible but than it does not behave in the manner that i describe instead it’ll do the reverse like window expand it shrink or it’ll expand in the wrong direction.

and i saw they had these events like window.moveable but not window.move event, just values to check if it is and no event to invoke it. Is this by design? Is there know window.resize event to plug in as a conditions? Or is the event sheet is mostly checking and watching for changes and not for events… so how do i know when the window resize?

Use fullscreen, problem solved. :grin:

When you have a number field, there is a number blue button on the side, click on it to see the list of available expressions.

i don’t know what you trying to tell me… if you familiar with css how would i make a tile sprite expand to always fit the with of the window that what i’m trying to do, is expand things. I don’t know if this do to my screen size but i played with fullscreen already and it just lock itself in full screen making it possible to close it by the exit button on the window which mean you have to close it by other means… but what does full screen do? screen size different so that will not help.

i figure it out with some javascript… but now i can see how i would do most of the manipulations in the event gui, but not the window resize event, unless there is away to listen for the window event with out writing the code for it. Now i’m on image swape or how to draw a image on top…

GDevelop is codeless game-making. Don’t expect much help about javascript or CSS. :slight_smile:

If you want a sprite to be the width of the window, resize it using the expressions shown in my screenshot above.

Javascript is the whole reason i choose this engine. I aim to use as much of the gui and the interface as much as i can even know i didn’t play with unity gui coding cause i rather code most things and let the engine handle other things. I, knowing, that i can build most of the logic in javscript “if” I wanted to is what made me choose gdevelop a couple of months ago and now i’m jumping on actually diving into it since i finish what i was working on. I already had to add “javscript code” action and made my own javascript function action and condition. for the most part i have a pleasant experience and look forward to learning more of what was attended to be used and than push it to what it wasn’t attended to do like they did with php, web pages, css, and javascript to see it do much more. Look forward to becoming more involve in the future if i can.

1 Like