Add missing argument force in UseItem

This commit is contained in:
Petr Mikheev 2023-09-11 16:21:34 +02:00
parent 9d186ee2cd
commit fb8ccf52d8
9 changed files with 24 additions and 19 deletions

View file

@ -20,14 +20,14 @@ Examples:
**UseItem**
Any script can send global event ``UseItem`` with arguments ``object`` and ``actor``.
Any script can send global event ``UseItem`` with arguments ``object``, ``actor``, and optional boolean ``force``.
The actor will use (e.g. equip or consume) the object. The object should be in the actor's inventory.
Example:
.. code-block:: Lua
core.sendGlobalEvent('UseItem', {object = potion, actor = player})
core.sendGlobalEvent('UseItem', {object = potion, actor = player, force = true})
UI events
---------