Ask coding questions

← Back to all posts
KaboomJS Program Not Loading Sprites
UCYT5040 (14)

I am using a template from the KaboomJS docs, however none of the sprites are loading. How can I fix this?

Answered by Coder100 (17088) [earned 5 cycles]
View Answer
Coder100 (17088)

you DON'T import them.
This is the kaboom language so that's handled for you on run.

UCYT5040 (14)

@Coder100 Thanks! Do you know why I get this? TypeError: player.move is not a function at Object.init (/:68:8) at go ( at frame (

Coder100 (17088)

@UCYT5040 yeah you have an extra )

please fix your code first

const player = add([
    // a 'sprite' component gives it the render ability
    // a 'pos'component gives it a position
    pos(100, 100),
    // a 'body'component makes it fall and gives it jump()
    // raw strings are tags