Jump to content

Moodle altering items [Meds like]


Svarog

Recommended Posts

Is there any way to have custom items that act like meds (Sleeping Pills, Beta Blockers, Anti Depressants etc.) as in, applying for example StressChange not instantly but over time? I tried to find something but failed.

I need this for a project I'm working on currently, any help will be greatly appreciated and credited should the project become shared as a mod. Thank You in advance for your assistance.

Link to comment
Share on other sites

The wiki is out of date, but if you find answers someone should update the wiki.

 

http://pzwiki.net/wiki/Modding#List_of_Item_Parameters

 

Someone else rounded up all of the current Weapon Item Parameters.

I know all of those, item scripts I got covered (Hell, I know more than that wiki shows). I need items that work like meds, take for example, Sleeping Pills, they do not simply increase Tiredness immediately, they work over time, that's what I need, I want to create a Herbalism mod, I don't want craftable items to be instant effect while proper meds work over time as it would be OP.

Link to comment
Share on other sites

IDK if this idea may help or not, but have you considered setting up a function that removes from a variable every ten (ingame) minutes, and afterward checks if the variable is zero before continuing?

I'll give you some sample code later (on my phone, and it's past midnight here ._.). I was working on something similar for my own project, but this is decidedly less complicated (and therefore within the grasp of my mediocre lua skills).

If you don't want to wait, play around with these:

Events.EveryTenMinutes.Add(Every ten minutes (simpler));

Events.OnTick.Add(Anywhere from 15 to 60 times a second (painful));

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...