0 votes

Music plays just fine when I call it in code. But I no matter what I set the loop value to (Even after reimporting with the loop value in place), it always loops back to the beginning of the song. Is there a way for me to fix this?

EDIT: Attempting to set the loop value in code didn't work either.

var testTitle = this.GetChild(0).GetChild(0) as AudioStreamPlayer;
testTitle.Stream._Set("loop", 1);
testTitle.Stream._Set("loop_offset", 14127);

EDIT #2: Just realized that the value is in seconds. Not Milliseconds. Setting it to 14.127 fixed the issue. Apologies.

Godot version 3.4.4 Stable Mono
in Engine by (210 points)
edited by

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.