HI
how can i move a sprite using just javascript from button
i have 1 button and 1 sprite
const sprite = runtime.objects.sprite;
sprite.x =20;
how can i get this to work
thankyou
Develop games in your browser. Powerful, performant & highly capable.
runtime.objects.sprite refers to the sprite object type, not any particular instance. Only instances have a position.
runtime.objects.sprite
Look at the simple keyboard movement scripting example.