Salk Posted December 28, 2014 Share Posted December 28, 2014 Hello! I am trying to understand why this following script works fine in outdoors area but fails to trigger the last line before the END in any indoors area I tried. IF PartyHasItem("wtpfmfer") Global("WTPINBACK", "GLOBAL", 1) Global("INBACKPACK", "GLOBAL", 0) !ActuallyInCombat() GlobalTimerExpired("WTPFAMWANTSOUT","GLOBAL") THEN RESPONSE #100 IncrementGlobal("INBACKPACK","GLOBAL",1) CreateCreatureObject("wtpnag3",Player1,0,0,0) ActionOverride("wtpnag3", StartDialogueNoSet(Player1)) END At first I thought it was some problem with the invisible creature I created (wtpnag3) so I used others like here under: CreateCreatureObject("belmin",Player1,0,0,0) ActionOverride("belmin", StartDialogueNoSet(Player1)) but same things happen: the creature is spawned but the dialogue never starts. Does anyone know why? Any guess? As I said, the script works without problems in each outdoors area I tested (a few) so I can't really make head or tail of this. Thanks for your help. Link to comment
DavidW Posted December 28, 2014 Share Posted December 28, 2014 It's potentially a bit dangerous giving an ActionOverride command to a created creature in the same script block that creates it - at a guess, the ActionOverride executes before the creature is actually placed. (And no, I've no idea why that should be true in some areas rather than all). If the invisible creature is being spawned specifically to initiate dialogue, give it a dialogue-starting script instead. Link to comment
Salk Posted December 28, 2014 Author Share Posted December 28, 2014 If the invisible creature is being spawned specifically to initiate dialogue, give it a dialogue-starting script instead. That's exactly why I spawned it. I know practically nothing about modding so I'd appreciate an example of dialogue-starting script if it's not too much of a bother. Would something like this suffice? IF True() THEN RESPONSE #100 StartDialogueNoSet(Player1) END Thanks. PS I tried putting a Wait(3) between the CreateCreatureObject and the ActionOverride but it yielded no results. Link to comment
DavidW Posted December 28, 2014 Share Posted December 28, 2014 If the invisible creature is destroyed by the dialog, that's fine. But it's probably safer to fire the dialog only once, as in IF !Global("talked","LOCALS",0) THEN RESPONSE #100 SetGlobal("talked","LOCALS",1) StartDialogueNoSet(Player1) END Link to comment
Salk Posted December 29, 2014 Author Share Posted December 29, 2014 Thanks, DavidW. The invisible creature is indeed destroyed by the dialogue. Tested and working fine. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.