Zomi- Posted November 3, 2019 Share Posted November 3, 2019 Hello everyone, how can I remove a specific number of hunger from a player? I do not want to set the draining higher, but just remove for example 10 „points“ of hunger from a player. Thank you! Link to comment Share on other sites More sharing options...
Serpens Posted November 3, 2019 Share Posted November 3, 2019 see hunger.lua component for "DoDelta" or search game code for hunger:DoDelta for example code Link to comment Share on other sites More sharing options...
Zomi- Posted November 3, 2019 Author Share Posted November 3, 2019 What do you mean? Link to comment Share on other sites More sharing options...
Serpens Posted November 3, 2019 Share Posted November 3, 2019 23 minutes ago, Zomi- said: What do you mean? if you never did it before: you open your DST directory and unpack the scripts.zip, now you have the current scripts of DST in a scripts folder (the game will still use the zip file) You can search/open all the script files of the game to search for sample code, eg in scripts/components the hunger.lua. To easily search all files at once, you can use eg notepad++, this can eg search all lua files for "hunger:DoDelta" and present you the results, to find more sample code. This is necessary for everyone who wants to create mods, since there are not many tutorials and you shall not open a thread for every little question. So I currently teach you how to answer simple questions yourself with help of the game code Link to comment Share on other sites More sharing options...
Zomi- Posted November 3, 2019 Author Share Posted November 3, 2019 Ok, understood! Thank you very much!! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now