HobbesHK,

await get_tree().idle_frame

Thank you for this! I just tried it out but unfortunately Godot throws an error on await get_tree().idle_frame : Invalid get index ‘idle_frame’ (on base: ‘SceneTree’).

Could it be because I’m running in application mode, which only refreshes the screen if there’s an update?

As an alternative, I’ve put the code to turn things off into its own function:


<span style="color:#323232;">func turn_off():
</span><span style="color:#323232;">	$"%SaveReport".visible = false
</span><span style="color:#323232;">	$"%BackMainMenu".visible = false
</span>

I’ve then tried an await turn_off()

The code runs, but doesn’t do anything and the screenshot still gets saved with the buttons visible.

I’m trying both await functions just before the take_screenshot() function like so:


<span style="color:#323232;">	await turn_off()
</span><span style="color:#323232;">	await get_tree().idle_frame
</span><span style="color:#323232;">	
</span><span style="color:#323232;">	take_screenshot()
</span>

Am I missing something very obvious here? Any help would be much appreciated!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • [email protected]
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • TheResearchGuardian
  • Ask_kbincafe
  • KbinCafe
  • feritale
  • Socialism
  • oklahoma
  • SuperSentai
  • KamenRider
  • All magazines