Author Topic: IWD: Movement commands override even override scripts  (Read 2175 times)

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
IWD: Movement commands override even override scripts
« on: January 24, 2008, 08:37:38 AM »
That's an interesting one, so I thought I'd share:

Normally, all party members in IWD use DPLAYER3.bcs. (And class scripts for their custom AI scripts).

I assign them new override scripts, and so far, it's working. But I noticed one interesting peculiarity: in BG2, a command

IF
Global("TalkNow","GLOBAL",1)
THEN
RESPONSE #100
StartDialogueNoSet(Player1)
END

overrides any commands the player gives to the characters. They Must Talk - and they do.

In IWD, however, it's different: while you keep giving them various commands, their scripts aren't being executed. So, if the dialogue is supposed to happen in the temple, but the player clicks-clicks-clicks his party members through, be happy if it happens outside(and not in the next chapter).

I suspect it's hardcoded, so there's not much I can do. But, yes, since it's Q&A forum: do you think there's a way to make the characters listen to what their script says, first and foremost? Area scripts are no-go, since I'm using Detect() command.

Offline Razfallow

  • Planewalker
  • *****
  • Posts: 10
  • Gender: Male
Re: IWD: Movement commands override even override scripts
« Reply #1 on: January 24, 2008, 12:24:56 PM »
Have you tried to use "SetInterrupt(I:State*Boolean)" action? I don't know if it'll help, but it might.

IF
Global("TalkNow","GLOBAL",1)
THEN
RESPONSE #100
SetInterrupt(FALSE)
StartDialogueNoSet(Player1)
SetInterrupt(TRUE)
END

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: IWD: Movement commands override even override scripts
« Reply #2 on: January 24, 2008, 12:36:54 PM »
Will do, thank you! I'll report when I do.

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: IWD: Movement commands override even override scripts
« Reply #3 on: January 24, 2008, 01:11:29 PM »
No, unfortunately it didn't work, I'm afraid.

Offline Razfallow

  • Planewalker
  • *****
  • Posts: 10
  • Gender: Male
Re: IWD: Movement commands override even override scripts
« Reply #4 on: January 24, 2008, 02:28:39 PM »
OK, and what about this?
 
IF
Global("TalkNow","GLOBAL",1)
THEN
RESPONSE #100
ClearActions(Myself)
StartDialogueNoSet(Player1)
END

IF
Global("TalkNow","GLOBAL",1)
THEN
RESPONSE #100
ClearAllActions()
StartDialogueNoSet(Player1)
END

IF
Global("TalkNow","GLOBAL",1)
THEN
RESPONSE #100
StartCutSceneMode()
ClearActions(Myself)
StartDialogueNoSet(Player1)
END

IF
Global("TalkNow","GLOBAL",1)
THEN
RESPONSE #100
StartCutSceneMode()
ClearAllActions()
StartDialogueNoSet(Player1)
END

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: IWD: Movement commands override even override scripts
« Reply #5 on: January 25, 2008, 01:21:25 AM »
I'll try all of these as soon as I get home, thank you.

However, I have reasons to believe it doesn't work like that: yes, SetInterrupt and ClearAllActions function correctly, but the trick is, by the time they're executing, NPC script kicks in in the first place. And it only kicks in(checks triggers before THEN and RESPONSE) when PC is not giving commands. It's a snake biting its own tail.

(I tried to give StartDialogueNoSet commands through area scripts, but, unfortunately, Detect() and Range() aren't functioning in area scripts, and InMyArea/AreaCheck isn't available in IWD, so).

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: