diovbc Posted February 5, 2017 Share Posted February 5, 2017 How could i code my character to be always prioritized by hounds when near one? I mean, if it enters the hounds 'FOV', the hound will switch target to this character, and attack that character until it dies. Link to comment https://forums.kleientertainment.com/forums/topic/73825-hounds-prorioty-attack/ Share on other sites More sharing options...
R1ncewind Posted February 6, 2017 Share Posted February 6, 2017 (edited) as i remember hounds code, they targeting player by default( are we talking about hounds from event?), but if hound get attacked by anything else he broadcasting such information in some radius and other able to target new threat. short answer - it's all about brains (which you don't need to change in your case) and about functions for combat component. Take a look for (i didn't code for a while, but can show direction which might help) OnAttacked() or OnGetAttacked() in combat component. There also OnAttack(). You can set up your custom functions for hounds prefab to force them not change target if they targeting player. Edited February 6, 2017 by R1ncewind Link to comment https://forums.kleientertainment.com/forums/topic/73825-hounds-prorioty-attack/#findComment-864196 Share on other sites More sharing options...
diovbc Posted February 12, 2017 Author Share Posted February 12, 2017 (edited) Nice. But how could i change that and implement into the game? I mean, i should create a new hound brain component and implement into the game through my character.lua? Edited February 12, 2017 by diovbc Link to comment https://forums.kleientertainment.com/forums/topic/73825-hounds-prorioty-attack/#findComment-865883 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