Fan48 Posted February 20, 2006 Share Posted February 20, 2006 What file do you use to equip an item during combat. Like the security spikes or the Handmaiden's Robe. Any and all help appreciated. Link to comment Share on other sites More sharing options...
Pavlos Posted February 20, 2006 Share Posted February 20, 2006 Security spikes are not equipped. The game performs a check for them (c_parts_spikes is the script) and then takes them away if you are successful (a_ia_use_comspk is the script) Just place c_parts_spikes in the conditional slot of the [success] part of your dialogue and the a_ia_comspk in your script slot. Things to do with c_parts_spikes on its line in the dialogue: To set the number you want set P1 on the correct line to anything you like - we'll say 10. To set c_parts_spikes for spikes set P2, on the correct line, to one. P3 can be used to say that your skills be factored. Things to do with a_ia_use_comspk on the correct line of the dialogue: Set P1 to the value of spikes you want to take away. Here is an image in case I didn't get the idea across: http://img105.imageshack.us/img105/7633/dialogue8mb.jpg In case you don't know about how to set the actual dialogue screen up: http://img50.imageshack.us/img50/7337/dialogue20oa.jpg The [success] part is the place you should put all your scripts. Now, if I have gone off on a tangent and you wanted to give yourself spikes you could use something like this: void main() { object oPC = GetFirstPC(); //Assigns oPC to the Playable Character int iVal = GetScriptParameter( 1 ); //Assigns iVal to the value of P1 CreateItemOnObject( "g_i_progspike01", oPC, iVal ); //Creates the object on oPC } A similar something is used if you wish to give robes to a character, like the Handmaiden: void main() { object oNPC = GetObjectByTag("MYNPC"); //Replace "MyNPC" with the tag of your NPC object oArmour = GetItemInSlot(INVENTORY_SLOT_BODY, oNPC); //Assigns oArmour to whatever is in your body slot object oRobe = CreateItemOnObject("MyRobe", oNPC); //Replace "MyRobe" with the Template ResRef. // This bit is only necessary if you wish to have the NPC equip the robe if (GetIsObjectValid(oArmour)) { AssignCommand(oNPC, ActionUnequipItem(oArmour)); } AssignCommand(oNPC, ActionEquipItem(oRobe, INVENTORY_SLOT_BODY)); } Link to comment Share on other sites More sharing options...
Fan48 Posted February 20, 2006 Author Share Posted February 20, 2006 I mean how the Handmaiden creates her robes and then puts them on. The security spikes was a bad example. Also, how would you do this in TK's dialogue editor? Link to comment Share on other sites More sharing options...
Pavlos Posted February 20, 2006 Share Posted February 20, 2006 Look at the final script - that should tell you everything you need to know. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.