kordhrufan Posted January 31, 2015 Share Posted January 31, 2015 I'm currently creating a mod character that can tame shadow creatures (crawling horror and terror break) and I'm having some issues, other creatures do not attack them! even when they are attacking them. For example, I send a crawling horror to attack a pigman and he doesn't attack him back.. Why is this happening? pet_CrawlingHorror.luapet_TerrorBreak.luashadowcreature.lua Link to comment https://forums.kleientertainment.com/forums/topic/50078-shadow-creatures-trouble/ Share on other sites More sharing options...
Mobbstar Posted January 31, 2015 Share Posted January 31, 2015 the shadow creatures are shadows, the pigmen and alike can't see them. If you remove the "shadow" tag, it should work Link to comment https://forums.kleientertainment.com/forums/topic/50078-shadow-creatures-trouble/#findComment-608254 Share on other sites More sharing options...
outseeker Posted January 31, 2015 Share Posted January 31, 2015 (edited) Just for reference, this is a little bit taken from shadowcreature.lua:inst:AddTag("shadowcreature")inst:AddTag("monster")inst:AddTag("hostile")inst:AddTag("shadow")inst:AddTag("notraptrigger")and this is from combat_replica.lua:function Combat:IsValidTarget(target) return target ~= nil and target ~= self.inst and target.entity:IsValid() and target.entity:IsVisible() and target.replica.combat ~= nil and target.replica.health ~= nil and not target.replica.health:IsDead() and not (target:HasTag("shadow") and self.inst.replica.sanity == nil) and not (target:HasTag("playerghost") and (self.inst.replica.sanity == nil or self.inst.replica.sanity:IsSane())) and (TheNet:GetPVPEnabled() or not (self.inst:HasTag("player") and target:HasTag("player"))) and target:GetPosition().y <= self._attackrange:value()endso you can kinda see how the tags are used to determine interactions. *edit* I actually took this from DST's files but yeah same swill for purposes of illustration XD Edited January 31, 2015 by outseeker Link to comment https://forums.kleientertainment.com/forums/topic/50078-shadow-creatures-trouble/#findComment-608269 Share on other sites More sharing options...
kordhrufan Posted January 31, 2015 Author Share Posted January 31, 2015 (edited) Problem solved! Edited February 1, 2015 by kordhrufan Link to comment https://forums.kleientertainment.com/forums/topic/50078-shadow-creatures-trouble/#findComment-608310 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