HomShaBom Posted September 16, 2015 Share Posted September 16, 2015 I'm working no my first mod, and my 1st step is trying to get a bunch of birds spawning around a structure. I looked at how beebox and beehive spawn bees, so I tried modifying the homesign to add a childspawner to it and make it spawn crows. When I test the mod I'm not seeing any errors, but crows are not spawning. What am I missing here? modmain.lua:function fn(inst) inst:AddComponent("childspawner") inst.components.childspawner.childname = "crow" inst.components.childspawner:SetRegenPeriod(1) inst.components.childspawner:SetSpawnPeriod(1) inst.components.childspawner:SetMaxChildren(10) inst.components.childspawner:StartSpawning()endAddPrefabPostInit("common/objects/homesign", fn) Link to comment https://forums.kleientertainment.com/forums/topic/57875-childspawner-troubles/ Share on other sites More sharing options...
HomShaBom Posted September 17, 2015 Author Share Posted September 17, 2015 I figured it out. In the homesign.lua file they refer to the prefab as "common/objects/homesign" so i thought I had to use that name here. It worked once i changed it to AddPrefabPostInit("homesign", fn)I figured it out. In the homesign.lua file they refer to the prefab as "common/objects/homesign" so i thought I had to use that name here. It worked once i changed it to AddPrefabPostInit("homesign", fn) Link to comment https://forums.kleientertainment.com/forums/topic/57875-childspawner-troubles/#findComment-673442 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