GeorgNihilus Posted July 18, 2007 Share Posted July 18, 2007 Alright I know how to equip a specific robe to a party member ... but what if I want to remove the playable character equiped robes i.e. to make her dance in a cantina, just because the team needs some money? (in Telos Cantina for example...) Can this be scripted? (I mean the undressing part ... for now...) thanks on advance Link to comment Share on other sites More sharing options...
stoffe Posted July 19, 2007 Share Posted July 19, 2007 Alright I know how to equip a specific robe to a party member ... but what if I want to remove the playable character equiped robes If you just want to remove any clothing/armor the character is wearing you can do it like: void main() { object oUndresser = GetObjectByTag("[color=Yellow]UndresserTag[/color]"); AssignCommand(oUndresser, ClearAllActions()); AssignCommand(oUndresser, ActionUnequipItem( GetItemInSlot(INVENTORY_SLOT_BODY, oUndresser), TRUE )); } ... where you set UndresserTag to the Tag of the NPC that should undress. Link to comment Share on other sites More sharing options...
Mindtwistah Posted July 19, 2007 Share Posted July 19, 2007 Stoffe, is that script for TSL or K1? If it is for TSL, can you post one for K1? Link to comment Share on other sites More sharing options...
swfan28 Posted July 19, 2007 Share Posted July 19, 2007 Originally Posted by Mindtwistah Stoffe, is that script for TSL or K1? It should work with both games. I was thinking of using a script like that with my Bastila Romance Enhancement mod right before the "an hour later" part but it might have crossed the line between what is allowed and whats not for a PG 11 game. Link to comment Share on other sites More sharing options...
Mindtwistah Posted July 19, 2007 Share Posted July 19, 2007 Is there a script that undresses the nearest NPC? Link to comment Share on other sites More sharing options...
GeorgNihilus Posted July 20, 2007 Author Share Posted July 20, 2007 Thanks Stoffe the scripts works perfect , still something odd happens when using it in Doton Het's dialog file (dotonhet.dlg); associated to a script that makes a delay with a blank screen ... just after the last spoken line of Doton this twilek continues talking and repeating phrases ... didn't happen to me when I used these delays same way on Mira's dialog or other party members dialogs ... gonna check what could be ... Link to comment Share on other sites More sharing options...
stoffe Posted July 20, 2007 Share Posted July 20, 2007 Is there a script that undresses the nearest NPC? Should work to use a similar script if you replace the first line with something like... object oUndresser = GetNearestCreature(CREATURE_TYPE_RACIAL_TYPE, RACIAL_TYPE_HUMAN, GetFirstPC(), 1, CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_NOT_PC); ...instead. Be aware though that many NPCs in the game technically aren't wearing anything at all, they just use a clothed/armored appearance model as their "undressed" body variation. Against such NPCs that script would not do anything. Link to comment Share on other sites More sharing options...
Leviathan Posted July 21, 2007 Share Posted July 21, 2007 Although I am not that conversant with Star Wars™ : Knights of the Old Republic® Scripting, and as I have not canvassed Script files intended for Star Wars™ : Knights of the Old Republic® II – The Sith Lords within a recent past, I would be nonetheless tempted to say that the following listing could be rather useful for whoever would want to remove Armors, Jedi Robes and other sorts of apparels worn by the nighest Non-Playable Character belonging to your Party. Evidently, because of the fact this kind of instructions was mainly utilized throughout Star Wars™ : Knights of the Old Republic®'s Scripts, they may not react the right way if they happened to be ported towards Star Wars™ : Knights of the Old Republic® II – The Sith Lords, and that's why I would like to get thoughts of experienced Scripters at first. Therefore, here it is : void main() { object oUndresser = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_NOT_PC); AssignCommand(oUndresser, ClearAllActions()); AssignCommand(oUndresser, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_BODY, oUndresser), TRUE )); } Link to comment Share on other sites More sharing options...
GeorgNihilus Posted August 3, 2007 Author Share Posted August 3, 2007 Now I'm asking this in this thread ... even it's not a robe doubt ... so I want to start a dialog but previously I don't want him/her with weapons in their hands ... so how do I unequip a party member in K1 off his weapons?? thanks people as always ... Link to comment Share on other sites More sharing options...
stoffe Posted August 3, 2007 Share Posted August 3, 2007 Now I'm asking this in this thread ... even it's not a robe doubt ... so I want to start a dialog but previously I don't want him/her with weapons in their hands ... so how do I unequip a party member in K1 off his weapons?? Do you only want the party members to be unarmed during the dialog, or before/after it as well? If it's just during the dialog you could let the dialog itself handle it for you without any need for scripts, if I remember correctly. Load your DLG file in tk102's DLG Editor, click on the top node in the treeview (the one listing the file name) and in the lower panel there should be an Unequip checkbox. If you want to unequip the party's weapons with a script you can do it like this: void main() { int i; for (i = 0; i < GetPartyMemberCount(); i++) { object oParty = GetPartyMemberByIndex(i); AssignCommand(oParty, ActionUnequipItem( GetItemInSlot(INVENTORY_SLOT_LEFTWEAPON, oParty), TRUE)); AssignCommand(oParty, ActionUnequipItem( GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON, oParty), TRUE)); } } Link to comment Share on other sites More sharing options...
GeorgNihilus Posted August 4, 2007 Author Share Posted August 4, 2007 Ahh great I'd prefer the 1st option (during dialog) I guess, but the script could be very helpful indeed ... thanks a lot ... Link to comment Share on other sites More sharing options...
GeorgNihilus Posted September 17, 2007 Author Share Posted September 17, 2007 Now guys I want to unequip the head items (neural bands, helmets or whatever) before starting certain animation or dialog branch, how do I do that, if possible? i.e. a script that unequips the PC and let's say Bastila head items ... thanks as usual Link to comment Share on other sites More sharing options...
stoffe Posted September 17, 2007 Share Posted September 17, 2007 i.e. a script that unequips the PC and let's say Bastila head items ... Something like this should work: void ST_Unequip(int iSlot, object oActor=OBJECT_SELF); void main() { ST_Unequip(INVENTORY_SLOT_HEAD, GetObjectByTag("Bastila")); ST_Unequip(INVENTORY_SLOT_HEAD, GetFirstPC()); } void ST_Unequip(int iSlot, object oActor=OBJECT_SELF) { AssignCommand(oActor, ActionUnequipItem( GetItemInSlot(iSlot, oActor), TRUE)); } Link to comment Share on other sites More sharing options...
GeorgNihilus Posted September 18, 2007 Author Share Posted September 18, 2007 Great! works perfect, by the way I'm using it for unequipping PC and Bastila's heads before the kissing animation scene from Bastila_romance_enhancement mod, in the Ebon Hawk ... Thanks Stoffe and 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.