Amberalex Posted March 13, 2018 Share Posted March 13, 2018 Hello. I am using weapon.fire() function and I want to set special property for bullet, that apear after calling this function. I tried to use forEach: weapon.bullets.forEach(function(bullet){ if(bullet.target == undefined){ bullet.taget = 'prop1'; return; } }); weapon.fire(); but this does not work. Link to comment Share on other sites More sharing options...
Amberalex Posted March 13, 2018 Author Share Posted March 13, 2018 Found solution via getFirstDead() Any other suggestions? Link to comment Share on other sites More sharing options...
Recommended Posts