Spawning grenades with surface.create_entity ignores damage bonus.

Place to get help with not working mods / modding interface.
Post Reply
User avatar
bigmond
Inserter
Inserter
Posts: 28
Joined: Fri Aug 30, 2019 11:11 am
Contact:

Spawning grenades with surface.create_entity ignores damage bonus.

Post by bigmond »

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

Code: Select all

/c game.forces["player"].set_ammo_damage_modifier("grenade",200)
/c game.forces["enemy"].set_ammo_damage_modifier("grenade",200)
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.
Please no more spagetti, I cant eat any more.

Post Reply

Return to “Modding help”