Jump to content

Recommended Posts

Okay, so i need help (again) with a couple of things. If you know how to do any one these things, please tell me c:

Thank you.

 

I need help with:

 

How to make a character not visible

How to make a character not visible to mobs

How to freeze a character how a couple of seconds

How to place a way point and then teleport back to it (with a button or something, doesn't really matter how)

How to play the insanity sounds without the character being insane

How to spawn a "statue" of the player in the sleeping animation

How to make a character temporally not being able to interact with tings (not being able to pick things up or cut down trees)

 

 

 

How to make a character not visible How to make a character not visible to mobs

See the files for shadow creatures. "..\scripts\prefabs\shadowcreature.lua"

 

 

How to freeze a character how a couple of seconds

I'm assuming you mean frozen in ice or something, not the winter-caused freezing. See the freezable component. "..\scripts\components\freezable.lua"

 

 

How to place a way point and then teleport back to it (with a button or something, doesn't really matter how)

See the purple staff's code. "..\scripts\prefabs\staff.lua" (look for "PURPLE STAFF")

 

 

How to play the insanity sounds without the character being insane

"..\scripts\prefabs\player_common.lua"

inst.SoundEmitter:PlaySound("dontstarve/sanity/gonecrazy_stinger")
How to spawn a "statue" of the player in the sleeping animation

 

Hmm. This one might be a little more complicated. You could possibly make a prefab with the same animation files as the original prefab, but without the player controls and such.

 

 

How to make a character temporally not being able to interact with tings (not being able to pick things up or cut down trees)

Modify the player controller's functions. "..\scripts\components\playercontroller.lua"

(Replacing the OnControl function should work)

Use this to modify a component.

local function component_modify_fn(inst)    -- ...endAddComponentPostInit("component_name", component_modify_fn)

Edit: Also have a look at this tutorial. Might be helpful for a lot of the things you need.

Edited by Blueberrys

@Blueberrys

Thank you, thank you, thank you.

I don't know what i'd do without you helping me haha.

I see a lot of things are already in the game.
I'll be having a closer look in game files before asking for help next time

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