Jump to content

Home

Trigger Issue


Recommended Posts

Okay then. Today I was attempting to set up a trigger that would fire a conversation once the PC crossed it. Now, I've done this before and it worked perfectly, yet I hadn't placed an actual spot for the trigger, I just left it at 0,0,0 and did the Geometry. Now today, I tried that as well as many other methods all with no success. So, I followed the tutorial posted by Stoffe, Darth333, and the BioWare developer guide and Trigger's and still no success. Here's some screenshots of my UTT and GIT file as well as the script I have for the trigger's onenter. Now, I followed what Stoffe and teh BioWare deveopler guide said to do and add the Geometry coordinates to that of my Trigger's base location.

 

Show spoiler
(hidden content - requires Javascript to show)
2vlv1c7.jpg

 

Show spoiler
(hidden content - requires Javascript to show)
j97hbq.jpg

 

Show spoiler
(hidden content - requires Javascript to show)
28724cw.jpg

 

Show spoiler
(hidden content - requires Javascript to show)
21mup7q.jpg

 

void main() {
   if (GetEnteringObject() != GetPartyMemberByIndex(0));
       return;

   if (!GetGlobalBoolean("DT_CHECK8") || GetLocalBoolean(OBJECT_SELF, 40))
       return;



   object oTalker = GetObjectByTag("k1r_assassin1");
   AssignCommand(oTalker, ClearAllActions());
   AssignCommand(oTalker, ActionStartConversation(GetFirstPC(), "k1r_assassin", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));

   SetLocalBoolean(OBJECT_SELF, 40, TRUE);
}

 

Now I do get a warning from the compiler saying: Warning: "if" or "else" statement followed by a blank statement. (i.e. if (x); ), but this is basically the script that stoffe posted in the tutorial, just with my tags added in, as well as GetPartyMemberByIndex(0)) replacing GetPartyLeader()) because the compiler called GetPartyLeader an undeclared identifier. I think everything is the way it's supposed to be, but I can't be too certain as it doesn't work obviously. Does anyone have any ideas as to what I'm doing wrong?

Link to comment
Share on other sites

void main() {
   if (GetEnteringObject() != GetPartyMemberByIndex(0))[b][color="Red"]; <== Get rid of this semicolon[/color][/b] 
       return;

   if (!GetGlobalBoolean("DT_CHECK8") || GetLocalBoolean(OBJECT_SELF, 40))
       return;



   object oTalker = GetObjectByTag("k1r_assassin1");
   AssignCommand(oTalker, ClearAllActions());
   AssignCommand(oTalker, ActionStartConversation(GetFirstPC(), "k1r_assassin", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));

   SetLocalBoolean(OBJECT_SELF, 40, TRUE);
}

Link to comment
Share on other sites

Try instead of using

AssignCommand(oTalker, ActionStartConversation(GetFirstPC(), "k1r_assassin", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));

the following, which triggers the triggered NPC's (in this case "oTalker") own attached .dlg file.

AssignCommand(oTalker, ActionStartConversation(GetFirstPC(), "", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));

Link to comment
Share on other sites

Your geometry in the .git file is all wrong. Your center point will be the coords you got from the whereami...in your case 114.10, 109.95, 0--leave these numbers where they are. Now, you are going to make a square around those coords. What I usually do is make it simple. I'll use a set of coords like....(2,2,0) (2,-2,0) (-2,2,0) (-2,-2,0)....I'll change the integer to 1 to make the trigger area smaller or some larger integer if I need it larger.

 

With the geometry you have now, your trigger area is huge..enormous..

Link to comment
Share on other sites

Yeah, I fixed it. The conversation starts just fine now. I used the geometry newbiemodder provided, as well as the script HH provided and everything worked. Granted, I had to up the values of the geometry from what newbiemodder originally posted to actually fill the space I needed, but even before I did that it still worked.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...