Jump to content

Recommended Posts

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!

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.

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...