Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#566752 03/06/15 09:51 AM
Joined: Apr 2015
M
mg4d Offline OP
stranger
OP Offline
stranger
M
Joined: Apr 2015
some easy questions smile
What is ItemHandle- when an Item get handle in game - what is different between an item and an itemHandle - is dropping process in game??

ItemGetHandle - what it mean in game?

Last edited by mg4d; 03/06/15 02:00 PM.
Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Handle is some sort of identifier for characters/items in the game. I haven't really used it myself so I don't know a ton about it.

So you could do something like this:
Code
IF
CharacterEnteredTrigger(_Player,TRIGGER_Fort_WatchLocked)
AND
GetItemhandleForItemTemplateInInventory(_Player,"WPN_Undead_Pickaxe_A_0f11d7e7-4e0b-4921-aa63-f8c6511ac631",_Handle)
THEN
CharacterEquipItemhandle(_Player,_Handle);


That would equip the template specified by checking your inventory for that template, grabbing the handle of it, and then the call can grab that handle.

On the surface it seems like a way to manipulate non-global items similar to how you can use GUID.

One of the things about handles I'm not sure about is how do you know what the handle is of an item before you want to use it. The only way I can see is using one of the queries but that seems to limit your options in using them.

Usually in cases like this if I don't know exactly what Larian does with these things I'll go spelunking in MAIN to see if they use it at all. Larian seems to use it for thievery especially. When you steal a specific object from someone and they catch you they can reference the handle and move it back to the NPC who owns it.

Example:
Code
IF
CharacterSpottedItemTheft_Redhanded(_Offender,_Spotter,_Owner,_Object,_Value,_Handle,_CrimeID,_X,_Y,_Z,_Pitch,_Yaw,_Roll,_Container)\
THEN
ItemHandleToCharacter(_Handle,_Owner,1);


Or here's a pretty simple one, this one "consumes" a skill book by removing it after use.
Code
IF
CharacterUsedItemTemplate(_Player, "BOOK_Skill_StatPoints_28b2ff38-74dd-494a-8a34-9020ecca47b1", _Handle)
THEN
CharacterAddAttributePoint(_Player, 1);
ItemHandleDelete(_Handle);
CharacterPlayEffect(_Player, "FX_GP_Level_Up_A");


Joined: Apr 2015
M
mg4d Offline OP
stranger
OP Offline
stranger
M
Joined: Apr 2015
Thank you smile
greetings


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5