It looks like you're new here. If you want to get involved, click one of these buttons!
setup.enemycd = function () { var elem = document.getElementById("enemycdbar"); var width = 1; var id = setInterval(frame, state.active.variables.enemy_cd2); function frame() { if (width >= 100) { clearInterval(id); <<twine_widget>>; } else if (state.active.variables.enemy_is_stunned != 0) {} else { width++; elem.style.width = width + '%'; } } };
Comments
[Twine2.1.1][Sugarcube 2.14] Is there a way to call a macro from JavaScript?