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 (230 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 Frequently asked questions and 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 [email protected] with your username.