I am trying to use the FireBullet behavior in js. So I added a js codeblock with the following:
var player = runtimeScene.getObjects("Player") let fireBullet = player.getBehavior('FireBullet') fireBullet.FireBullet()
the FireBullet function does not work on the behaviour. On debugging I found that the variable fireBullet is not undefined, and contains the behaviour as it’s value, but I don’t know which function to use to get the same result as this:
Any help telling how to fire a bullet using the behaviour from js will be greatly appreciated. Thanks!