Jump to content

More Questions


CoM_Solaufein

Recommended Posts

It kind of depends whether you are placing the script block in a script that can be interrupted. If you're putting the spawn block in an area script, it doesn't matter whether it comes before or after you change the global. If you're putting it in a creature script, you're better off closing the global after the spawn.

Link to comment

I am redoing my Ninafer and Anomen romance in The Undying mod. I am using some scripting to make sure their dialogs go off like they should. I have a sample of their first discussion script. Does this look right?

 

// Anomen is a knight first check
IF
   InParty(Myself)
   InParty("Anomen")
   Global("AnomenIsKnight","GLOBAL",1)
   Global("CmT_NinaAnomenKnightTalk","GLOBAL",0)
THEN
 RESPONSE #100
   RealSetGlobalTimer("CmT_NinaAnomenKnightTalkTimer","GLOBAL",300)
   SetGlobal("CmT_NinaAnomenKnightTalk","GLOBAL",1)
END
IF
   InParty(Myself)
   InParty("Anomen")
   See("Anomen")
   !StateCheck(Myself,CD_STATE_NOTVALID)
   !StateCheck("Anomen",CD_STATE_NOTVALID)
   CombatCounter(0)
   !Detect([ENEMY])
   RealGlobalTimerExpired("CmT_NinaAnomenKnightTalkTimer","GLOBAL")
   Global("CmT_NinaAnomenKnightTalk","GLOBAL",1)
THEN
 RESPONSE #100
   SetGlobal("CmT_NinaAnomenKnightTalk","GLOBAL",2)
END
IF
   InParty(Myself)
   InParty("Anomen")
   See("Anomen")
   !StateCheck(Myself,CD_STATE_NOTVALID)
   !StateCheck("Anomen",CD_STATE_NOTVALID)
   CombatCounter(0)
   !Detect([ENEMY])
   RealGlobalTimerExpired("CmT_NinaAnomenKnightTalkTimer","GLOBAL")
   Global("CmT_NinaAnomenKnightTalk","GLOBAL",2)
THEN
 RESPONSE #100
   MoveToObject(Anomen)
   StartDialogueNoSet(Anomen)
END

 

Which starts this dialog:

 

CHAIN IF ~Global("CmT_NinaAnomenKnightTalk","GLOBAL",2)~ THEN BCMNINAF AnomenIsKnight

~Anomen and Ninafer mushy, mushy dialog stuff.~

DO ~SetGlobal("CmT_NinaAnomenKnightTalk","GLOBAL",3)~

==BANOMEN

Link to comment

Dialog() and its variants will reference the default file for non-joined creatures and the J file for joined creatures. What you're looking for is Interact(), which uses the B file. :D

 

MoveToObject(Anomen) should be MoveToObject("Anomen")

 

I think that's about it :)

Link to comment

In some banter questions I want specific replies depending on <CHARNAME>s alignment.

SAY ~Did you enjoy killing those bandits?~

Reply 1 MASK_EVIL ~No of course not. (Lie)~

Reply 2 !MASK_EVIL ~No of course not. There is no pleasure in killing another.~

How do you do a check for this?

Link to comment

Archived

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

×
×
  • Create New...