Jump to content

Recommended Posts

So I'm currently trying to implement an ability for one of my modded characters that will make Reanimated Skeletons (Both the regular and forest Stalker creatures) follow him and be neutral towards him if he's nearby. From what I can see in the code for the Shadow Thurible (thurible.lua), the neutralizing properties of the thurible are given to the item with the "shadowlure" tag, but it acts differently when I add the tag to my character. While initially the tag works as intended, the cave Stalker will randomly decide to target the character, and it will not de-aggro unless it is distracted by an actual Shadow Thurible. The Skeleton will also target you if you get into combat as well. So, any ideas on why the "shadowlure" tag doesn't work properly when applied to a player instead of an item?

On 3/24/2022 at 7:30 AM, Mr.Rickzzs said:

In my opinion you can have a look at brains/stalkerbrain.lua, if you want to modify stalkers' behavior, it is not something simply adding a tag.

I actually figured it out. It doesn't have to do with the brain, in a sense. The problem was the "Retarget" function that the Stalker has, which has a bunch of tags that it can't retarget to, and also some tags that it is required to retarget to. Since "shadowlure" isn't included in any of the tags that it can't retarget to, and it isn't near an actual thurible, it simply retargets to the character after a brief moment, instead of instantly, like it would do with an untagged character. I've made my own abstract way around this problem, though.

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