Jump to content

Custom Charackter Mod Help


Recommended Posts

Evening/Morning DST community,

Me and a friend of mine trying to getting a Custom charackter for him to work, i do mainly the art for him and he firstime messing with the code. Currently he done after trial and error 2 Goals but the last one is a bit more tricky.

The Last Goal is that his charackter should Fainting (sleep) when his sanity reach 0 and when he gets attacked or wakes up he should get some sanity back. After now some hours of searching we wasnt able to get any hints or directions how we could get this working.

Is this possible actualy or when anyone could get helping hands on it would be rlly great.


Best regards.

Edited by Deathlord Avon
Link to comment
Share on other sites

Small update after alot more trial and error, my friend manage to get the first half working he falls into sleep and get knockouted when going to 0 sanity now he just cant get Sanity back when waking up apparently.

Anyone ideas ?

Best regards

Link to comment
Share on other sites

unfortunately there is no event for starting sleep/waking up (eg. in tent).

But this is also not what you are searching for.
To go to "sleep" you should use the grogginess component to "knockout" your character.
So you can use this function:
Grogginess:AddGrogginess(grogginess, knockoutduration)
(test a bit around with the values, to get the result you want).

This fires the event "knockedout" and "cometo" when knocked out and waking up again.
But unfortunately it does not fire "cometo" when you wake up cause of an attack...
Only solution I can imagine for now, is to also listen for an event, if you are attacked...

Link to comment
Share on other sites

3 hours ago, Serpens said:

unfortunately there is no event for starting sleep/waking up (eg. in tent).

But this is also not what you are searching for.
To go to "sleep" you should use the grogginess component to "knockout" your character.
So you can use this function:
Grogginess:AddGrogginess(grogginess, knockoutduration)
(test a bit around with the values, to get the result you want).

This fires the event "knockedout" and "cometo" when knocked out and waking up again.
But unfortunately it does not fire "cometo" when you wake up cause of an attack...
Only solution I can imagine for now, is to also listen for an event, if you are attacked...

Yes for the sleeping the grogginess and Knockout event he figured out already. So far everything is working except when he wakes up to give him some sanity back will looking for listening event stuff i guess.

Best Regards

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