I've got an instance of this behavior, so how can I call it?
I can´t check it right now but I think you have to reference the behavior too. So
playerins.8direction.speed
Behaviours for exist on the "behaviors" field of the instance.
for (const inst of runtime.objects.Sprite.instances()) { const Bullet = inst.behaviors.Bullet; if (Bullet.distanceTravelled > 2000) { inst.destroy(); } }
Develop games in your browser. Powerful, performant & highly capable.
Note also the documentation for the behaviors property in the scripting reference for instances.
behaviors
Thank you for your answer!
Hope to add code prompt about "behavior" as soon as possible !!!!!