Changing an entity health.

Place to get help with not working mods / modding interface.
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Changing an entity health.

Post by ficolas »

I think this was removed on 0.3, if so, why? and plz move this to modding interface requests.

Also gethealth isnt there :S

I know there is the die method but I want to change the health, not to kill.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Changing an entity health.

Post by FreeER »

the entity.health value is no longer unchangeable. As proof type this into the console

Code: Select all

if game.player.character.health then game.player.print(game.player.character.health) game.player.character.health = 200 game.player.print(game.player.character.health) end
<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

Post Reply

Return to “Modding help”