Jump to content

Home

AutoFire Scripts


TheProphet

Recommended Posts

I am trying to make a script autofire to start a dialogue, I have the script set up perfectly, because in the beginning it worked when i put the script under the ScriptSpawn header of the npc it belonged to, only now its stopped working. Does anyone know any other ways to make a script autofire when you get in the module? Here is the script:

void main()
{
object oPC=GetFirstPC();

AssignCommand(OBJECT_SELF,ActionStartConversation(
oPC,"adon"));
}

Link to comment
Share on other sites

Check my tk102 birthday mod: http://pcgamemods.com/10110/

 

I made a similar script that fires when your PC enters the swoop racing registration on Tatoine, another one when he enters the cantina and another when you enter the party module. They are attached to the OnEnter event for the module. Here is an example:

k_ptat_17ae_area.nss

 

it looks like this:

void main()
{

 int nPlot = GetGlobalNumber("End_TraskTalk");
 object oEntering = GetEnteringObject();
 object oPC=GetFirstPC();
 if (GetIsPC(oEntering))
     {
     if  ((nPlot == 1) && (!GetIsObjectValid(GetObjectByTag("d3_duros"))))
           {
         CreateObject(OBJECT_TYPE_CREATURE, "d3_duros", Location(Vector(-5.21,4.87,1.39), 0.0));
         NoClicksFor(0.5);
         AssignCommand((GetObjectByTag("d3_duros")),ActionMoveToObject(oPC));
         AssignCommand((GetObjectByTag("d3_duros")), ActionDoCommand(ActionStartConversation(oPC)));
           }

    ExecuteScript("old_17ae_area", GetModule()); 	
    }

}

 

In the d3_party.mod file if the tk birthday mod, I also used a trigger that fires a script that spawns two tukatas when you cross a certain area. You could also fire a dialogue with a trigger. The trigger file is called d3_tukata.utt if I remember well.

 

Something similar happens when you click on the birthday cake too...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...