Generator

Automatically drops an item on an interval (cooldown).

Functions

setCooldown(cooldown: number)

Sets the cooldown of the generator (in seconds). This is how many seconds passes in-between item drops. Defaults to 20 seconds.

setItem(itemType: ItemType)

Sets the type of item that is dropped by the generator.

setMax(max: number)

Sets the max stack size that the generator can hold. Once the max stack size is reached, no more items will be generated until the items are picked up. Defaults to 10.

setPosition(position: Vector3)

Sets the position of the generator.

getPosition(): Vector3​

Returns the position of the generator.

dropItem(itemType: ItemType)

Immediately drops an item from the generator.

destroy()

Destroys the generator.