Difference between revisions of "Osiris/API/CharacterUseItem"

From Divinity Engine Wiki
Jump to: navigation, search
(Documented CharacterUseItem)
 
m
Line 27: Line 27:
 
* Helper [[Osiris/Shared/ProcBlockUseOfItem|ProcBlockUseOfItem]]
 
* Helper [[Osiris/Shared/ProcBlockUseOfItem|ProcBlockUseOfItem]]
  
[[Category:Osiris Calls]]
+
[[Category:Osiris Calls|CharacterUseItem]]

Revision as of 17:19, 19 December 2017

Full Definition(s)
  • call CharacterUseItem((CHARACTERGUID)_Character, (ITEMGUID)_Item, (STRING)_Event)
Description

Makes _Character, which can either be a player character or an NPC, use _Item. If _Item is not in _Character's inventory, _Character will first walk to it if they're too far. Once they have used _Item, the story event _Event will be sent to _Character.

Notes
  • Using an item results in the following flow:
  • If the item usage fails, _Event will never be thrown.
  • _Item can be a consumable or an item in the world.
See Also