Cazka / diepAPI

An API for https://diep.io
MIT License
15 stars 8 forks source link

how to detect your own ball #59

Closed tariteur closed 1 year ago

tariteur commented 1 year ago

I tried with entitycolors but I was not successful entity.parent to me

Cazka commented 1 year ago

this will log your bullets

diepAPI.extensions.entityManager.load()
diepAPI.apis.game.on('frame', () =>{
    const player = diepAPI.extensions.entityManager.getPlayer();
    const bullets = diepAPI.extensions.entityManager.entities.filter(x => x.parent == player);
    console.log(bullets)
});
tariteur commented 1 year ago

ty