Author Topic: New at this ~ I've looked everywhere for this problem... its simple I think.  (Read 454 times)

Legacy_Zelious

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0


               I think the reason that I couldn't find any help on this is because it probably is a very simple solution that I should just know...

I was using the Lilac Soul's NWN Script Generator to start up a conversation whenever someone spawned in the first location of my module. The script turned out like this:

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*   Script generated byLilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625    */
//Put this script OnEntervoid main(){
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
object oTarget;oTarget = GetObjectByTag("opening");
AssignCommand(oTarget, ActionStartConversation(oPC, "opening"));
AddJournalQuestEntry("Beginning", 1, oPC, FALSE, FALSE);
}/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Which looks okay to me, makes since. But the problem is I can't tell if it is going to be overhead text or text in a box.

Its mostly been overhead text, which is what I don't want.

The object "Opening" that the conversation is starting from was originally a bloodstain, at first it didn't work. I redid the code on Lilac Soul and it became text in a box. But the speaker was "Bloodstain" with a picture of a bloodstain as the portrait.

I didn't want this, so I changed the speaker from owner to Opening, which I used the sprite "Invisible Object" for there to be no portrait at all.

This changed the text in the box to be overhead text, which I really didn't want. So I tried to change it back to bloodstain, but its still just overhead text, no matter what I do.

I've been looking everywhere for a problem similar to this, and I can't find any, so please help.
               
               

               
            

Legacy_ehye_khandee

  • Hero Member
  • *****
  • Posts: 1415
  • Karma: +0/-0
New at this ~ I've looked everywhere for this problem... its simple I think.
« Reply #1 on: September 01, 2010, 12:20:46 pm »


               as presented, it will not run, 'void main()' needs to be moved onto a line by itself, as it is, it is part of a comment and therefore will not run at all.

Assuming you fix the above issue, I'll proceed to address your next question "I can't tell if it is going to be overhead text or text in a box"  - All convos are text which appears in a convo box - I am guessing that is the box you are interested in... if you make the convo private, the text is ONLY there in the box.

Specifically, review the function "ActionStartConversation" the answers you seek lay there I think.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
New at this ~ I've looked everywhere for this problem... its simple I think.
« Reply #2 on: September 01, 2010, 10:04:55 pm »


               I would also like to know where your are running the script from.  Is it from the area OnEnter event or from a trigger.  If it is from the area event I would have to wonder if the PC is even in the area yet when the NPC tag "opening" gets the command to talk to the PC.  He might be looking around for the PC and not seeing him anywhere in site.
               
               

               
            

Legacy_Zelious

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
New at this ~ I've looked everywhere for this problem... its simple I think.
« Reply #3 on: September 02, 2010, 10:00:09 am »


               Hey guys, thanks for the replies, to anwser your question, ehye, I don't know how that happened, the void main(); is not in that line with the comment slashes in the code, there are no errors in it, it compiles nicely.

And Light, it is in the Area OnEnter, the NPC is in right in front of the start location.

I've been looking into the "ActionStartConversation"  part of the script, still working on it, adding TRUE, FALSE
doesn't seem to work like http://www.nwnlexico...nversation.html
leads me to believe.

It says the layout is like this:

void ActionStartConversation(
object oObjectToConverseWith, 
string sDialogResRef = "opening", 
int bPrivateConversation = FALSE, 
int bPlayHello = TRUE);

So I try:

AssignCommand(oTarget, ActionStartConversation(oPC, "opening", TRUE, TRUE));

And it gets rid of the conversation all together...

I also found this from the old NWN forums:
http://nwn2forums.bi...80150&forum=114

But I don't see a properties box, only an option box, and that has nothing to do with in-game and everything to do with the toolset.
               
               

               


                     Modifié par Zelious, 02 septembre 2010 - 09:02 .
                     
                  


            

Legacy_Okto

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
New at this ~ I've looked everywhere for this problem... its simple I think.
« Reply #4 on: September 02, 2010, 11:01:28 am »


               This works for me:



void main()

{

object oPC = GetEnteringObject();

if (!GetIsPC(oPC)) return;

int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));

if (DoOnce==TRUE) return;

SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);

object oTarget = GetObjectByTag("opening");

AssignCommand(oTarget, ActionStartConversation(oPC, "opening", FALSE, FALSE));

//AddJournalQuestEntry("Beginning", 1, oPC, FALSE, FALSE);

}



I placed an Invisible Object near the starting point, changed it's TAG to opening and make sure the object IS NOT flagged as static!! (I named it _WELCOME_)



About the conversation:

Make sure there is at least one option to choose when you create a conversation. If you only put in 1 main line without options, it will always show as text above the PC/Object.
               
               

               
            

Legacy_Zelious

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
New at this ~ I've looked everywhere for this problem... its simple I think.
« Reply #5 on: September 02, 2010, 11:33:50 am »


               Awesome, thanks a lot!

What I had was the conversation one line at a time, thinking that the toolset would automatically put the continue option in, guess I was wrong.

Also, the object I was flagging as static. Guess there wasn't anything wrong about the script then.
               
               

               


                     Modifié par Zelious, 02 septembre 2010 - 10:34 .