Spawning grenades with surface.create_entity ignores damage bonus.
Posted: Fri May 21, 2021 11:51 am
Hi
I have been experimenting with spawning grenades on either side using commands. I noticed that grenades spawned with surface.create_entity dont do any damage to me. After some testing I realised that this was because I was wearing power armour and the grenades were behaving as if there had been no research to increase damage.
I tried increasing explosive damage with comands using these
If a player throws the grenade this does enough damage to be an instant kill, if I spawn the grenade with create_entity it only does 35 damage, as if no research has been done or damage modifiers have been applied.
I have tried spawning the grenades on both the player and enemy force and it still only seems to do basic damage.
Is ther any way to get surface.create_entity to respect a force's damage modifiers and research.
I have been experimenting with spawning grenades on either side using commands. I noticed that grenades spawned with surface.create_entity dont do any damage to me. After some testing I realised that this was because I was wearing power armour and the grenades were behaving as if there had been no research to increase damage.
I tried increasing explosive damage with comands using these
Code: Select all
/c game.forces["player"].set_ammo_damage_modifier("grenade",200)
/c game.forces["enemy"].set_ammo_damage_modifier("grenade",200)
I have tried spawning the grenades on both the player and enemy force and it still only seems to do basic damage.
Is ther any way to get surface.create_entity to respect a force's damage modifiers and research.