Keleigh3000 Posted August 27, 2013 Share Posted August 27, 2013 Is there a way for a script to check if the PC currently has an item equipped in a given slot, hat, eyeglasses, whatever? Link to comment Share on other sites More sharing options...
jazzisparis Posted August 27, 2013 Share Posted August 27, 2013 player.GetEquippedObject X Where X is the slot ID (integer). You can find a list of the slot ID codes here. Link to comment Share on other sites More sharing options...
Keleigh3000 Posted August 27, 2013 Author Share Posted August 27, 2013 Thank you kind sir. I'm going to save that doc for future reference. And I see that that would be a NVSE function, GTK. So to verify, would this work as a true/false? Like so: if (player.GetEquippedObject 10 == 0) PrintC "Player is not wearing a hat"else PrintC "Player is wearing a hat"endif Depening on whether the PC is wearing a hat, right? EDIT: Never mind, I find that it does. Thanks again for your help. Link to comment Share on other sites More sharing options...
jazzisparis Posted August 28, 2013 Share Posted August 28, 2013 Yep. You can either use it to retrieve the base form of the object equipped in a slot: set rItem to player.GetEquippedObject 10 or as a Boolean expression: if player.GetEquippedObject 10 == 0 ; Returns true if no item is currently using that slot. Link to comment Share on other sites More sharing options...
Keleigh3000 Posted August 28, 2013 Author Share Posted August 28, 2013 Didn't refresh before editing the above. The Boolean does just what I wanted, I can now tell if the PC is hatless or not.Thanks again for your help. Link to comment Share on other sites More sharing options...
Recommended Posts