Jump to content

Home

How to unequip someone...


GeorgNihilus

Recommended Posts

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? :giveup: (I mean the undressing part ... for now...)

 

thanks on advance :thumbsup:

Link to comment
Share on other sites

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

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

Thanks Stoffe the scripts works perfect :urpdude: , 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 ... :roleyess:

Link to comment
Share on other sites

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

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

  • 2 weeks later...
Now I'm asking this in this thread ... even it's not a robe doubt :rolleyes: ... 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?? :dozey:

 

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

  • 1 month later...
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...