Jump to content

Recommended Posts

Hi. 

I'am rly trying to make a custom spawner, my idea is a spawner can spawn more than 1 mob with different types in a  specific period of time. 
(EX: spawn 3 hound and 2 pigs in every 20 sec, both in the same time.) 

I took the houndmound.lua and start editing from this file.   I trying to change the number of spawn and what mob i need to spawn in houndmound.lua.

Another question is if i can change the tuning. components (on script folders), because i trying to change the  "HOUNDMOUND_REGEN_TIME" to a ridiculous time, than i can release all mobs inside the spawner when "HOUNDMOUND_RELEASE_TIME" is complete.

(sry if this looks confuse, and thaks for any help)

Edited by Velokz
4 hours ago, Lumina said:

It's better to not change the tuning value. As far as i know you could create custom value for what you need, for example :


local CUSTOM_REGEN_TIME = 1

And use it in your code when needed.

Okay! i will use this, but in this case i use: 

inst.components.childspawner:SetRegenPeriod(.01)
inst.components.childspawner:SetSpawnPeriod(.01)

This way i got change the speed of spawner. (i just put  ".01", before are one .tuning value)

I'm still trying to spawn more than 1 mob at the same time ;--;  can i use "SpawnPeriod" to realease all "Children" inside the spawn, like when he is attacked? 

Thank you for reply anyaway!^^

I'm sorry, i don't know really how this work. I don't remember a thing spawning two different kind of monster. I don't remember a thing spawning all the monster at the same time by regular spawn, but there is this line :


    if inst.components.childspawner ~= nil then
        inst.components.childspawner:ReleaseAllChildren()
    end

(This come from mermhouse : if you ignite the house, all merm will go outside, for example). Maybe you could find a way to call it when you need to spawn more than one monster ? (i guess the houndmound use the same function when attacked)

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