I have an idea for a mod, and I'm having trouble figuring it out. I want a slow, constant health drain on the player (multiplayer friendly) that takes about an hour to fully drain your health. Or possibly override the automatic health gain after taking damage. Or better yet both.
I looked at the mod called Stamina, and I can't figure it out. I'm such a newb.
Anyway any help would be great, I have an idea for a small mod based on this mechanic.
Thanks for any help you can give.
health drain
- ZombieMooose
- Filter Inserter
- Posts: 289
- Joined: Mon Feb 09, 2015 7:23 am
- Contact:
health drain
"men will literally learn everything about ancient Rome instead of going to therapy"
Re: health drain
I believe you can even put negative regeneration in prototype definition.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
- ZombieMooose
- Filter Inserter
- Posts: 289
- Joined: Mon Feb 09, 2015 7:23 am
- Contact:
Re: health drain
I found a lua/entityprototype called healing_per_tick that does it, but it requires you to take damage first. How do I set this up to start automatically at game start? maybe add an activation item that damages you for 1 health?Adil wrote:I believe you can even put negative regeneration in prototype definition.
To be honest this seems easier than I thought lol
"men will literally learn everything about ancient Rome instead of going to therapy"
Re: health drain
You can cause damage to an entity with entity.damage().
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
- ZombieMooose
- Filter Inserter
- Posts: 289
- Joined: Mon Feb 09, 2015 7:23 am
- Contact:
Re: health drain
so would I create some event that started whenever the players health was full and then cause a health drain?prg wrote:You can cause damage to an entity with entity.damage().
how would I do that?
"men will literally learn everything about ancient Rome instead of going to therapy"
- ZombieMooose
- Filter Inserter
- Posts: 289
- Joined: Mon Feb 09, 2015 7:23 am
- Contact:
Re: health drain
okay I found the on tick thing, which should work for what I'm doing - just set a number of ticks and such but as I said I'm new to coding so where would I go to find out how this looks?
"men will literally learn everything about ancient Rome instead of going to therapy"
Re: health drain
How what looks?diongham wrote:okay I found the on tick thing, which should work for what I'm doing - just set a number of ticks and such but as I said I'm new to coding so where would I go to find out how this looks?
I would giuess my signatures and modding guides. Would be a nice place to start. Also Klonan does some simple mods which are great learning exmples.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.