keeperfx icon indicating copy to clipboard operation
keeperfx copied to clipboard

Lua: Add OnDropped function to Things

Open Trotim opened this issue 5 months ago • 2 comments

Custom objects can now be picked up and dropped. We could use a Lua way to detect this.

This could be a DroppedFunc field in the object cfg similar to UpdateFunc, and/or a OnThingDropped trigger event that returns the Thing (and thus its position).

If dropped on another creature or thing, it ideally is also returned (such as when gold is given to a creature to pay it).

Possible application are single use potions or bombs players can grab and drop to cause magical effects or damage in the area around where it has landed.

Trotim avatar Jul 24 '25 12:07 Trotim

@Trotim Is the UpdateFunc not already sufficient? That this gets access to when it is dropped?

Loobinex avatar Jul 24 '25 13:07 Loobinex

the trigger #4087 already mentioned, so covered by that issue

PieterVdc avatar Jul 25 '25 09:07 PieterVdc