Its like this, on titlescreen but now i have timer to delay the music as temp fix ( i hate it tho) without that timer it plays music on splashscreen which is strange:
extends Node
func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
$MarginContainer/VBoxContainer/TextureButton.grab_focus()
yield(get_tree().create_timer(0.5), "timeout")
$Music.play()
And i have first scene as intro.tsc , then video plays, no musicplay() in gd script, but that splash screen is even before that first video, so title screen is not even actuive yet but it plays music because of that $Music.play() command from titlescreen, its weird, i remove that play command and music doesnt play on splashscreen but it also wont play at all, its not on autoplay,is there any other way to make godot not play music just because it loaded future scene into memory? titlescreen scene with music is 2nd screne.
I have intro.tsc then titlescreen.tsc and stage1.tsc. i have musicplay in titlescreen and stage1 but it plays the music before these scenes are onscreen.
This is my intro, its the scene right after splashscreen
func _ready():
pass # Replace with function body.
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
func _input(ev):
if Input.is_key_pressed(KEY_SPACE):
get_tree().change_scene("res://TitleScreen.tscn")
func _on_VideoPlayer_finished():
get_tree().change_scene("res://TitleScreen.tscn")
func _on_TouchScreenButton_pressed():
get_tree().change_scene("res://TitleScreen.tscn")
func _unhandled_input(event):
if event.is_action_pressed("fullscreen"):
OS.window_fullscreen = !OS.window_fullscreen