Jump to content

Recommended Posts

Hello!

I'm looking to implement three features, all of which i have no idea how to do.

1) Stop peaceful animals running away

2) Remove the shadow of my character
 

3) Remove the indicator for my character

Thanks in advance for any help :grin:

 

Edit: I am awful at modding so please guide me through like I'm a 5 year old

Edited by Mbfox
Link to comment
Share on other sites

@Mbfox,

the MakePlayerCharacter function on the bottom of your characterprefab is just a shortcut for all the stuff that actually has to be done to set up your characters, which u can find in player_common.lua

to disable your shadow:

inst.DynamicShadow:Enable(false)
to disable your minimapicon(which i guess u meant with "indicator"):

inst.MiniMapEntity:SetEnabled(false)
As for the creatures running away: u have to look into their brains (eg pigbrain.lua), to find the reason why the run away. usually they use a function called RunAway within the PriorityNode(which lists the behaviours the creature follows, the most prior at the top). Most creatures check for the "scarytoprey" Tag in their RunAway function, which again gets added to your character within player_common.lua.

so u can stop most(!) creatures from running away from u, by removing the "scarytoprey" Tag from your character:

inst:RemoveTag("scarytoprey")
Edited by Seiai
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...