Darkrex Posted September 20, 2021 Share Posted September 20, 2021 I just recently started modding DST but I can't get my head around how to access entities in DST so I can mod them. My idea is pretty basic, I want to make so when the players are close to a Mandrake that's dancing, they receive a certain amount of sanity per second. I followed a tutorial and have the structure and icons working, but I'm not sure what to require or add into the modmain.lua. Any help is welcome, thanks in advance! Link to comment https://forums.kleientertainment.com/forums/topic/133788-i-need-help-understanding-entities/ Share on other sites More sharing options...
DecDuck Posted September 20, 2021 Share Posted September 20, 2021 Usually you would use AddComponentPostInit("id", func) which runs a function in the entity for you. This is where you add the code that adds or changes feature of your entity. I'm on my laptop, so I can't make an example for you, but there are many mods that use it and there are lots of examples. Link to comment https://forums.kleientertainment.com/forums/topic/133788-i-need-help-understanding-entities/#findComment-1496627 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