GeorgNihilus Posted June 28, 2008 Share Posted June 28, 2008 Hi again ... now I try to check if the handmaiden is wearing certain robe, but not from her default dialog (handmaiden.dlg) but from an NPC dialog. The default game script to check worn robes may be this: // c_obj_worn_body: Check if OBJECT_SELF is wearing ItemByTag in Body slot. // INPUT: string param - tag of armor // BMA-OEI 8/9/2004 int StartingConditional() { string sItem = GetScriptStringParameter(); object oItem = GetObjectByTag(sItem); if ( GetIsObjectValid(oItem) ) { if ( GetItemInSlot(INVENTORY_SLOT_BODY, OBJECT_SELF) == oItem ) { return TRUE; // Item exists and is equipped in Body slot. } } return FALSE; } but only checks the OBJECT_SELF ... I changed it to this but it didn't work either ... (in red, changes) // c_obj_worn_bodh: 'should' check if the Handmaiden is wearing ItemByTag in Body slot. // INPUT: string param - tag of armor int StartingConditional() { string sItem = GetScriptStringParameter(); object oItem = GetObjectByTag(sItem); if ( GetIsObjectValid(oItem) ) { if ( GetItemInSlot(INVENTORY_SLOT_BODY, [color="Red"]GetObjectByTag("Handmaiden"))[/color] == oItem ) { return TRUE; // Item exists and is equipped in Body slot. } } return FALSE; } so ... how can I 'see' if she has for example a danceroutfit outside the handmaiden dialog?? thanks on advance people! Link to comment Share on other sites More sharing options...
stoffe Posted June 28, 2008 Share Posted June 28, 2008 Hi again ... now I try to check if the handmaiden is wearing certain robe, but not from her default dialog (handmaiden.dlg) but from an NPC dialog. so ... how can I 'see' if she has for example a danceroutfit outside the handmaiden dialog?? You can check the tag of what the Handmaiden has in her body slot and see if it matches the tag of the dancer outfit. That makes it somewhat more reliable if there is more than one object with the same tag in the game world. Otherwise it might not find the correct one to check. Like: int StartingConditional() { object oHand = GetObjectByTag("Handmaiden"); if (!GetIsObjectValid(oHand)) return FALSE; return (GetTag(GetItemInSlot(INVENTORY_SLOT_BODY, oHand)) == "DancersOutfit"); } Link to comment Share on other sites More sharing options...
GeorgNihilus Posted July 3, 2008 Author Share Posted July 3, 2008 Excellent! the kind of script I needed ... thanks. very helpful as usual ... good modding ... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.