Jump to content

Home

Equipping NPCs


TimBob12

Recommended Posts

Hi there,

I am trying to equip an NPC with a custom datapad. He dies immediately so I want it to appear in remains. However I have attempted to script this. The NPC appears, he dies after a short and sweet conversation, but no datapad appears. I am using the on enter script to make this happen.

 

void main()
{
// ST: Check if it's the player entering the trigger, and that it hasn't 

already fired 
if (!GetLocalBoolean(OBJECT_SELF, 40) && (GetEnteringObject() == 

GetFirstPC())) { 

// ST: Make sure the trigger only fires once. 
SetLocalBoolean(OBJECT_SELF, 40, TRUE); 


object oNPC1 = CreateObject(OBJECT_TYPE_CREATURE, "c_officer_corpse", 

Location(Vector(25.38,66.07,14.61), 0.0));

CreateItemOnObject("czerka_o_datapad",oNPC1);

           }


    ExecuteScript("k_ptat20aa_enter_old", OBJECT_SELF); 	

}

 

Please help. I am stumped. I am pretty sure I have used this script before and it worked.

 

Thanks in advance.

 

TimBob12

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...