Wolf_EX Posted August 9, 2017 Share Posted August 9, 2017 I am doing the creature mod tutorial and am trying to figure out how to make it so I can attack the creature. I looked through multiple prefabs that you can attack and the things they all have in common that has to do with combat is inst:AddComponent("combat") inst:AddComponent("health") inst:ListenForEvent("attacked", OnAttacked) local function OnAttacked(inst, data) .... end I added each of those to my prefab(in the correct place) and I can't attack the creature when i left click it. What am i missing? Link to comment https://forums.kleientertainment.com/forums/topic/81116-how-to-make-a-prefab-attackable/ Share on other sites More sharing options...
Wolf_EX Posted August 9, 2017 Author Share Posted August 9, 2017 I figured it out. I didn't know you couldn't attack followers and gave it a follower component. Link to comment https://forums.kleientertainment.com/forums/topic/81116-how-to-make-a-prefab-attackable/#findComment-945034 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