#how to make game always on top?

22 messages · Page 1 of 1 (latest)

polar wren
#

What line of code do i need to write to make it true? (so that I can change it during run time)

spice lagoon
#

Oops, sorry you are asking for the window

#

It is this property

polar wren
#

is it like always_on_top.set_flag(true)?

spice lagoon
#
window.always_on_top = true
polar wren
#

ok i tried this and im not getting any errors but for some reason it still doesnt go on top

spice lagoon
#

So that is your main game window? What is it meant to go on top of?

polar wren
#

yes this is my main game window

#

i just want it to be permanantly on top of the players other stuff like their broswer

spice lagoon
#

Does it work when you check the box in the project settings?

polar wren
#

yes

spice lagoon
#

That is indeed the property, searching around says this is the answer

#

It won't work if it is not a transient window, but I assume you have not set it as that

polar wren
#

yeah its not a transient window i think

#

when i remove the window variable i get this but idk what i can do to fix this other than having the window variable

spice lagoon
#

I did a quick test to toggle it on and off and it appears to work for me

#

Can you confirm if that code is even running?

#

I am on Godot 4.3 Windows 10

polar wren
#

ok sorry i just found out the code u sent works

#

i forgot i made a button and i needed to actually press the button to make it work