Jump to content

Photo

Initiating a dialogue after LeaveAreaLUA


8 replies to this topic

#1 Domi

Domi

    Where is now your Troy, O Cassandra?

  • Gibberlings
  • 12706 posts
  • Gender:Male
  • Location:Canada

Posted 05 August 2004 - 07:27 PM

I am trying to make an NPC speak after party was teleported to another area via LeaveAreaLUA sequence.

By some reason when I add a script checking for AreaCheck in the area where the group moved and the variable set after the dialogue the global does not advance, just stay the same. Neither the dialogue summons if I am trying to trigger it on a Global set during the conversation that initiated the transport. :(

Any suggestions how to make an NPC talk just after teleport?
Faster. Faster. Faster would be better. -Mal Reynolds, Serenity
I understand that folks prefer code that works. -CamDawg, G3

#2 Echon

Echon

    Planewanker

  • Modders
  • 322 posts
  • Gender:Male
  • Location:Denmark

Posted 05 August 2004 - 10:52 PM

I think it would be easier to help if you post the script you are using for this.

-Echon

#3 Domi

Domi

    Where is now your Troy, O Cassandra?

  • Gibberlings
  • 12706 posts
  • Gender:Male
  • Location:Canada

Posted 06 August 2004 - 06:15 AM

It was something like that:

SAY ~Blah~
IF ~~ THEN DO ~SetGlobal("PRIELD",GLOBAL",1) -----> this Global is setting fine
ActionOverride(Player1, LeaveAreaLUA() block for all 6 players, transfers them in Area FW#### succesfully~
EXIT
END

Then in NPC's script (checked that it assigns itself to the Override Script):

IF
InParty("Myself")
Global("PRIELD",GLOBAL",1)
AreaCheck("FW####")
THEN
RESPONSE # 100 (and yes, it's spelled correctly in the proper script)
SetGlobal("PRIELD",GLOBAL",3) ----> this is the one that does not set
StratDialogueNoSet(Player1)
END

I will try to add a timer next to prompt the script to run...
Faster. Faster. Faster would be better. -Mal Reynolds, Serenity
I understand that folks prefer code that works. -CamDawg, G3

#4 Echon

Echon

    Planewanker

  • Modders
  • 322 posts
  • Gender:Male
  • Location:Denmark

Posted 06 August 2004 - 11:50 AM

Well, one of the triggers is obviously returning false but it looks to me as if you might as well remove some of them. I assume that the party cannot interfere between the teleportation and the dialogue starting, so you may just stick to using Global("PRIELD",GLOBAL",1) as the only trigger since it will be set to another value afterwards.

Also, you could try using all three triggers one after the other to isolate the one which is causing trouble.

-Echon

#5 Domi

Domi

    Where is now your Troy, O Cassandra?

  • Gibberlings
  • 12706 posts
  • Gender:Male
  • Location:Canada

Posted 06 August 2004 - 11:51 AM

When I use Global("PRIELD",GLOBAL",1) I can force the dialogue from the NPC, but he will not initiate it. The trouble is I think with being moved to the area... I want to see if the timer will help matters along and force the area check.

Edited by Domi, 06 August 2004 - 11:53 AM.

Faster. Faster. Faster would be better. -Mal Reynolds, Serenity
I understand that folks prefer code that works. -CamDawg, G3

#6 Echon

Echon

    Planewanker

  • Modders
  • 322 posts
  • Gender:Male
  • Location:Denmark

Posted 06 August 2004 - 12:38 PM

What do you mean by "I can force the dialogue from the NPC, but he will not initiate it"?

Are you absolutely sure the global is set correctly? Since they are stored in the savegame, it takes a second or two for the game to do it. If the party is moved to that area immediatly after, it may not do it.

-Echon

#7 Domi

Domi

    Where is now your Troy, O Cassandra?

  • Gibberlings
  • 12706 posts
  • Gender:Male
  • Location:Canada

Posted 06 August 2004 - 12:59 PM

If I force talk him (meaning selecting the talk to button and clicking on the NPC) he spouts the proper dialogue (obviously only in the case when I use the Global that sets itself), and yes, Global sets via DO option in the dialogue correctly (checked via GetGlobal), but does not update itself from NPC's override script when arriving into the new area.

Edited by Domi, 06 August 2004 - 01:00 PM.

Faster. Faster. Faster would be better. -Mal Reynolds, Serenity
I understand that folks prefer code that works. -CamDawg, G3

#8 BigRob

BigRob

    The Prince of Worthless Trivia

  • Gibberlings
  • 3932 posts
  • Gender:Male
  • Location:Over there.

Posted 06 August 2004 - 05:11 PM

If the script you posted before is an exact copy, maybe this is the problem:

StratDialogueNoSet(Player1)

I'm only guessing, but shouldn't it be:
StartDialogueNoSet(Player1) ?
Aklon: Traveller. Healer. Warrior. Lover. Coming Soon at G3 (I swear!)

Click here to visit Aklon's G3 page.

Cam is on some kind of crack or something... either that, or it's the influence of Dr. Feelgood. - Icelus


The second confusing thing about Australia are the animals. They can be divided into three categories: Poisonous, Odd, and Sheep.

-Douglas Adams

#9 Domi

Domi

    Where is now your Troy, O Cassandra?

  • Gibberlings
  • 12706 posts
  • Gender:Male
  • Location:Canada

Posted 10 August 2004 - 06:50 AM

No, no - it is a typo only on the board.

So after adding a timer and variable shift to area of arrival script I managed to move the blasted variable up...

and what did I get?

A dialogue which initiates, but grabs any available line from the dialogue file of the non-joinable NPC who was the last one to speak and started the LUA action sequence! After I commented out all available lines, the dialogue does not initiate... it wants lines from the bloody non-joinable NPC file!

And the Dialogue(Player1) is still in the joinable NPC script! I guess it has something to do with the way the dialogue was build into the in-game one (EXTEND_BOTTOM of one of the states for teh case when specific NPC is in the party). I will try ending on the NPC's line prior to the action sequence and see if it helps any.
Faster. Faster. Faster would be better. -Mal Reynolds, Serenity
I understand that folks prefer code that works. -CamDawg, G3



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users