Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.

Hookpoints: ChestBreakReceived

D1G1T4L3CH0 edited this page Feb 26, 2015 · 1 revision

Summary

When a chest is broken, this event is triggered.

Object Returned

Data Type Object Description
int X X coordinate of the chest.
int Y Y coordinate of the chest.

Example

Lua

import ('Terraria') -- for Main class.

function YourPlugin:Initialized()
	export.Hooks = {}
	export.Hooks.ChestBreakReceived
	{
		Call = export.OnChestBreakReceived,
	}
end

function YourPlugin:OnChestBreakReceived(ctx, args)
	Tools.WriteLine( tostring( args.X ) .. "," .. tostring( args.Y ) )
end
Clone this wiki locally