Jump to content

Another Issue with NextTriggerObject()


Recommended Posts

This is more of a WeiDU bug, but I'm putting it here in case it's desired to put a warning into the documentation for NextTriggerObject().

WeiDU doesn't play nice with Player1.  Example: TriggerOverride(Player1,SomeCheck()) gets put into the dialogue file exactly like that.  It doesn't break it out into NextTriggerObject(Player1) SomeCheck(). The result is it doesn't work.  It gives no warning, it just doesn't work.  Also, ~NextTriggerObject(Player1) SomeCheck()~ will be interpreted the same way and TriggerOverride(Player1,SomeCheck()) will be put into the dialogue file and will not work as expected.

The only way I've found to get around this is to use the negative of SomeCheck() like,  ~NextTriggerObject(Player1) !NotSomeCheck()~.  WeiDU will leave this alone and it'll work as expected.

Link to comment

It does that if you have an unidentifiable IDS label in the script block.

~TriggerOverride(Player1,True())~  ends up in the dialog file as:

NextTriggerObject(Player1)
True()

~TriggerOverride(Player0,True())~ ends up in the dialog file as:

TriggerOverride(Player0,True())

Because 'Player0' is not a defined object label by default.  It's expecting you to define "Player0" later on, because with dialog files, you can.

It does however spit out a warning during the install.

There are also situations where it doesn't do that when it should, such as converting "StateCheck([PC.2.ELF.101],0)" into:

  StateCheck([PC.ANIMAL.ELF.ANKHEG],STATE_NORMAL)

Instead of leaving it as "[PC.2.ELF.101],0"

The value of those labels (ANIMAL, ANKHEG, STATE_NORMAL) may change, and that is NOT what was specified.

Link to comment
13 minutes ago, kjeron said:

It does that if you have an unidentifiable IDS label in the script block.

~TriggerOverride(Player1,True())~  ends up in the dialog file as:



NextTriggerObject(Player1)
True()

Unfortunately, I've tested this multiple times and it doesn't work.

 

EDIT: It may have to do with the method used to put the code in.  I use variables sometimes to hold code blocks depending upon which mods are installed, etc.  So in the mymod.d file it looks like %DIALOGUES_CHANGES_FOR_THIS_NPC% Where DIALOGUES_CHANGES_FOR_THIS_NPC has been set to ~TriggerOverride(Player1,True())~.  This will fail 100% of the time.  If I have DIALOGUES_CHANGES_FOR_THIS_NPC set to ~NextTriggerObject(Player1) True()~, it will fail 100% of the time.  If I have DIALOGUES_CHANGES_FOR_THIS_NPC set to ~NextTriggerObject(Player1) !False()~  it will work as expected.

Edited by Lauriel
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...