Thread history

Fragment of a discussion from Talk:ExclusionNano
Viewing a history listing
Jump to navigation Jump to search
Time User Activity Comment
No results

Take a look at Sabreur's code, it should have the solution to both problems.

Basically, in the onBulletHit event, you want to adjust the enemy energy to account for the damage from the bullet that just hit, so it doesn't register a false Energy Drop. When you use a (mostly) constant bullet power, like Sabreur does, you can pre-calculate and hardcode the bullet damage to save a lot of Codesize. However, if your bullet power is highly variable, you need to adjust by Rules.getBulletDamage(e.getBullet().getPower()).

Sheldor16:14, 28 April 2013