The wiki says that damage can take an optional "damage type"...anyone know how to actually give it? I've tried entity.damage(1, game.forces.player, explosion) and "explosion". Console simply gives me "bad arg #2 to 'damage' (string expected, got table)", I've tried swapping the force and damage type and get the expected "table expected, got string". Tried even giving it a couple tables but no luck (i didn't really expect any with that lol)
so...help?
How to specify damage type with entity.damage()?
How to specify damage type with entity.damage()?
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me

Or drop into #factorio on irc.esper.net
Re: How to specify damage type with entity.damage()?
So ... this is a bug 
It tries to parse the second argument as damage type instead the third one
All I can say is, that it will get fixed in 0.8.0

It tries to parse the second argument as damage type instead the third one

All I can say is, that it will get fixed in 0.8.0
Re: How to specify damage type with entity.damage()?
Ok, wasn't sure if I was missing somethingkovarex wrote:So ... this is a bug
It tries to parse the second argument as damage type instead the third one


<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me

Or drop into #factorio on irc.esper.net