Jump to content

A script that counts how much of a type of food player eats.


antstubell

Recommended Posts

Still easing myself back into scripting, so help appreciated.

Player can eat kelp. Kelp is fine in moderation, too much and you get sick. After say 3 helpings of kelp player is warned 'don't eat anymore kelp today or you will get sick'. I've started a game enabled quest that I hope will handle all of this but am unsure how to do it. Also what event needs to be called to register when player eats something?

Thanks.

Edited by antstubell
Link to comment
Share on other sites

If the Kelp is custom to your mod, add a script to one of its custom effects and have that script increment a global variable. The global variable will be used on the quest script to track how many times the kelp was eaten.

 

Otherwise you have to get real tricky with conditions when using the OnItemRemoved event on a player alias script.

Link to comment
Share on other sites

So far all the kelp does is increase health by 1. Not very filling. I don't want any visible effects just when player has eaten X kelp and attempts to eat 1 more, a message will appear saying 'Not a good idea. Wait until tomorrow.' This sounds quite complex, should I simplify it?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...