Skip to content

Commit ba246c9

Browse files
committed
Only 1 animation at a time
1 parent 69946ff commit ba246c9

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

iwsy/iwsy.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -508,17 +508,9 @@ const IWSY = (playerElement, scriptObject) => {
508508
// Animate blocks
509509
const animate = step => {
510510
let continueFlag = true;
511-
for (const name of step.blocks)
512-
{
513-
for (const block of script.blocks) {
514-
if (block.defaults.name === name) {
515-
for (const vfx of block.vfx) {
516-
continueFlag = step.continue === `yes`;
517-
startVFX(step, vfx);
518-
}
519-
break;
520-
}
521-
}
511+
for (const vfx of step.block.vfx) {
512+
continueFlag = step.continue === `yes`;
513+
startVFX(step, vfx);
522514
}
523515
if (script.runMode === `manual`) {
524516
enterManualMode(step);

iwsy/resources/ecs/steps.txt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
input TitleInput
3535
input LabelInput
3636
input DurationInput
37+
input BlockInput
3738
input TargetInput
3839
input URLInput
3940
textarea InitCSS
@@ -710,7 +711,15 @@ EditFadeDown:
710711
return
711712

712713
EditAnimate:
713-
gosub to EditBlockList
714+
create TR in Table
715+
create TD in TR
716+
set the style of TD to `width:6em`
717+
set the content of TD to `Block:`
718+
create TD in TR
719+
index BlockInput to SelectedStep
720+
create BlockInput in TD
721+
set the style of BlockInput to `width:100%`
722+
set the content of BlockInput to property `block` of CurrentStep
714723
gosub to EditContinue
715724
return
716725

@@ -1132,12 +1141,8 @@ SaveCurrentStep:
11321141
end
11331142
else if Action is `animate`
11341143
begin
1135-
put property `blocks` of CurrentStep into Blocks
1136-
if Blocks is empty
1137-
begin
1138-
set Blocks to array
1139-
set property `blocks` of CurrentStep to Blocks
1140-
end
1144+
index BlockInput to SelectedStep
1145+
set property `block` of CurrentStep to the text of BlockInput
11411146
index ContinueSelect to SelectedStep
11421147
set property `continue` of CurrentStep to ContinueSelect
11431148
end

0 commit comments

Comments
 (0)