runOnStartup(async runtime => {
runtime.objects.Player.setInstanceClass(Player);
runtime.addEventListener("beforeprojectstart", () => {
runtime.addEventListener("mousedown", (e) => {
const Player = runtime.objects.Player.getFirstInstance();
if(Player) {
Player.jump();
}
});
runtime.addEventListener("tick", () => {
const Player = runtime.objects.Player.getFirstInstance();
if(Player) {
Player.tick();
}
});
});
});
Everything works fine exept the jumping part. The bird is rotated but no jumping force (vectorY) is applyed. It seems that this is only a read only value. The documentation says, that you can also edit the value (https://www.construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/behavior-interfaces/platform). What am I doing wrong?!