Jump to content

Help needed - Script for sanity gain when prototyping?


Recommended Posts

Hi all!

I'm currently working on a character mod of a cowardly lightbulb-man that lights up the dark based on his sanity levels, and prototyping should give him life-force/HP. I just have no idea where the script for the sanity gain when prototyping is. does anyone know what prefab to look for? And how would I make a 15hp gain happen when it happens?

 

20170419223848_1.jpg

Link to comment
Share on other sites

Look at builder.lua in the game scripts. It pushes events when building things, like "builditem" and "buildstructure", which you can listen to, and give yourself some sanity. The builder-component is on your character, so it should be straight-forward.

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
 Share

×
  • Create New...