Jump to content

Home

What file to use equipping during dialogue?


Fan48

Recommended Posts

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

Archived

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

×
×
  • Create New...