FractiousLemon Posted July 6, 2016 Share Posted July 6, 2016 (edited) What the title says. I want a character to automatically befriend the anthropomorphic creatures such as pigmen, bunnymen, and merms. Is there a simple bit of code I can use for this? I'm sorry to say I'm not particularly skilled with programming (it's a wonder I ever managed to complete my mod in the first place), but if I could add this feature, it would fit the character incredibly well. Edited July 6, 2016 by FractiousLemon typo Link to comment https://forums.kleientertainment.com/forums/topic/68668-simple-way-to-make-creatures-friendly/ Share on other sites More sharing options...
R1ncewind Posted July 6, 2016 Share Posted July 6, 2016 (edited) common way to make any character friedly: change his tags (i.e. monster), thats make other non-hostile mobs neutral to him change brains change onattack, onattacked, ontarget functions i taked it from my memory, maybe i missed something here. But it's common procedure. Some mobs will require less changes. but it's not easy at all. about pigmen - he is not hostile at all, just give him food and he will follow you for some period of time. if talking about code, pigmen's brain is probably most complicated. Edited July 6, 2016 by R1ncewind Link to comment https://forums.kleientertainment.com/forums/topic/68668-simple-way-to-make-creatures-friendly/#findComment-790312 Share on other sites More sharing options...
FractiousLemon Posted July 6, 2016 Author Share Posted July 6, 2016 Sounds like more than I can manage, unfortunately. Thanks for the input, though! Link to comment https://forums.kleientertainment.com/forums/topic/68668-simple-way-to-make-creatures-friendly/#findComment-790401 Share on other sites More sharing options...
Andmann Posted July 31, 2016 Share Posted July 31, 2016 you can go into the prefabs. theres no need to change the brain. whether a pig man is your friend or not is merely a variable. you'd only need to look at brains if you wanted to somehow completely change their behaviour. you're gonna have to look through the pigmans prefab and analyze the structure. Basically a bunch of functions and one of them will do something to the pigs obedience ( I think that's what it's called in the code) what this function will probably also do is, assign an ally to the pig once a certain obediency level has been reached. You may be able to bypass this process by using your own character (player.GetCharacter()) as a parameter and directly grant servitude. Don't forget to look at how the ally state is removed as well Link to comment https://forums.kleientertainment.com/forums/topic/68668-simple-way-to-make-creatures-friendly/#findComment-798999 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now