MaiTerra Posted January 29, 2016 Share Posted January 29, 2016 (edited) So I'm trying to make a SW mod character who has a trait similar to Webber, but with snakes. Snakes would be neutral towards the character and could be befriended with meat. But looking through Webber's prefab, I can't find what it is that makes spiders neutral towards him. I thought it would be the "monster" or "spiderwhisperer" tags but I found nothing in the game's files that implies they're used for that. I even gave the tags to my character and spawned some spiders to test it but the spiders still attacked unprovoked. I see all of Webber's other traits in the prefab file (walking on webs, eating monster meat, spider egg recipe, and silk beard) but nothing seems to point towards making spiders neutral. Am I missing something about the tags or is the code for what I'm looking for just elsewhere? (Also I'm sorry if maybe this belongs in Kleislist instead? I'm not sure what this counts as since I was just asking that one question and I haven't been here in so long I didn't even realize that forum was a thing until after I posted this) Edited January 29, 2016 by MaiTerra Link to comment https://forums.kleientertainment.com/forums/topic/63423-what-makes-spiders-neutral-to-webber/ Share on other sites More sharing options...
PanAzej Posted January 29, 2016 Share Posted January 29, 2016 From Spider's Retarget function: return FindEntity(inst, targetDist, function(guy) if inst.components.combat:CanTarget(guy) and not (inst.components.follower and inst.components.follower.leader == guy) and not (inst.components.follower and inst.components.follower.leader == GetPlayer() and guy:HasTag("companion")) then return (guy:HasTag("character") and not guy:HasTag("monster")) end end) Spider checks if nearby targets is tagged as "character" but cancels targetting if target is also tagged as "monster". Link to comment https://forums.kleientertainment.com/forums/topic/63423-what-makes-spiders-neutral-to-webber/#findComment-715016 Share on other sites More sharing options...
MaiTerra Posted January 30, 2016 Author Share Posted January 30, 2016 It works like a charm, thank you! Maybe I did something wrong when I tested out the monster tag so I didn't notice that. Either way, it works perfectly. Link to comment https://forums.kleientertainment.com/forums/topic/63423-what-makes-spiders-neutral-to-webber/#findComment-715257 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