no problemo, here’s a link to the current game as it is right now https://arcade.makecode.com/S37861-42218-62759-21058
additionally, here’s also the specific function where the error is occuring
function interaction (dialog: Array[]) {
while (!(DialogActive)) {
timer.background(function () {
DialogActive = true
})
controller.moveSprite(char, 0, 0)
music.play(music.createSong(assets.song`mySong`), music.PlaybackMode.InBackground)
TheBox = sprites.create(assets.image`logbox`, SpriteKind.Player)
animation.runImageAnimation(
TheBox,
assets.animation`speechbubble`,
150,
true
)
TheBox.setFlag(SpriteFlag.RelativeToCamera, true)
TheBox.setPosition(80, 140)
spriteutils.moveTo(TheBox, spriteutils.pos(80, 98), 250, true)
TheBox.z = 2
char1 = sprites.create(assets.image`c1`, SpriteKind.Player)
animation.runImageAnimation(
char1,
FreastLog.Char1(dialog[0]),
200,
true
)
char1.setFlag(SpriteFlag.RelativeToCamera, true)
char1.setPosition(-60, 54)
spriteutils.moveTo(char1, spriteutils.pos(24, 54), 250, false)
char2 = sprites.create(assets.image`c0`, SpriteKind.Player)
animation.runImageAnimation(
char2,
FreastLog.Char2(dialog[0]),
200,
true
)
char2.setFlag(SpriteFlag.RelativeToCamera, true)
char2.setPosition(200, 54)
spriteutils.moveTo(char2, spriteutils.pos(136, 54), 250, true)
NamePlate = sprites.create(assets.image`CharBox`, SpriteKind.Player)
animation.runImageAnimation(
NamePlate,
assets.animation`namePlate`,
150,
true
)
NamePlate.setPosition(32, 76)
NamePlate.setFlag(SpriteFlag.RelativeToCamera, true)
nameText = textsprite.create("", 0, 13)
nameText.setFlag(SpriteFlag.RelativeToCamera, true)
nameText.setPosition(7, 75)
nameText.z = 4
NamePlate.z = 3
char2.z = 1
char1.z = 1
story.setSoundEnabled(true)
for (let index = 0; index <= dialog.length - 1; index++) {
if (FreastLog.Priority(dialog[index]) == 0) {
char1.setScale(1.05, ScaleAnchor.Middle)
char1.y = 48
char2.setScale(0.8, ScaleAnchor.Middle)
char2.y = 54
} else {
char2.setScale(1.05, ScaleAnchor.Middle)
char2.y = 48
char1.setScale(0.8, ScaleAnchor.Middle)
char1.y = 54
}
animation.runImageAnimation(
char1,
FreastLog.Char1(dialog[index]),
200,
true
)
animation.runImageAnimation(
char2,
FreastLog.Char2(dialog[index]),
200,
true
)
nameText.setText(FreastLog.Name(dialog[index]))
story.printDialog(FreastLog.Dialog(dialog[index]), 80, 100, 40, 150, 6, 0, story.TextSpeed.VeryFast)
}
sprites.destroy(nameText)
sprites.destroy(NamePlate)
controller.moveSprite(char, 100, 100)
spriteutils.moveTo(char1, spriteutils.pos(0, 60), 100, true)
sprites.destroy(char1)
spriteutils.moveTo(char2, spriteutils.pos(160, 60), 100, true)
sprites.destroy(char2)
spriteutils.moveTo(TheBox, spriteutils.pos(80, 140), 100, true)
sprites.destroy(TheBox)
TheBox.z = 0
timer.background(function () {
pauseUntil(() => spriteutils.isDestroyed(TheBox))
DialogActive = false
})
}
}