Jump to content

Recommended Posts

So I was wondering in general, how do you make a placeable world structure burnable? Essentially, I have a item similar to a chest that you can place like a chest and has an inventory and so forth. However, though it works like I intended, the one issue I am having is allowing it so that it can burn similar to a crockpot, drying rack, or a chest, like its a burnable camp item with the execption that it dissappears fully after it has burned and drops whatever is within it.

On 16/7/2016 at 1:12 AM, blazerdrive09 said:

how do you make a placeable world structure burnable?

You give it a burnable component.You have a global function thats does this for you in general. In the case of the chest:

MakeSmallBurnable(inst, nil, nil, true)
On 16/7/2016 at 1:12 AM, blazerdrive09 said:

However, though it works like I intended, the one issue I am having is allowing it so that it can burn similar to a crockpot, drying rack, or a chest, like its a burnable camp item with the execption that it dissappears fully after it has burned and drops whatever is within it.

Use this:

inst:ListenForEvent("onburnt", function(inst)
	inst:DoTaskInTime(0, inst.Remove)
end)

so the chest gets burned, drops stuff (all thanks to MakeSmallBurnable), then gets removed the next frame (with that snippet).

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