Jump to content

Interjection Shenanigans


Skye

Recommended Posts

Ken and I have been playing around with interjections a lot lately and I've noticed a peculiar issue that I could use some help with since neither of us can explain it.

I've chosen a random situation where our NPC interjects Shoal as she asks for a kiss and simplified the example for the sake of brevity.

INTERJECT SHOAL 1 InterjectShoal
  == MYNPCJ IF ~IsGabber("MyNPC")~ THEN @1 DO ~Something()~
  = @2 DO ~SomethingElse()~
EXIT

As expected, that adds a forced transition with the global and the custom trigger to the dialog. The strange part is that after @1, the dialog should immediately transition into @2, but instead, weidu adds two transitions, one of which is a dead end and exits and the other goes to @2, but has the IsGabber() trigger repeated for some reason.

Again, simplified for brevity:

IF ~~ THEN BEGIN N
  SAY #1
  IF ~~ THEN DO ~Something()~ EXIT
  IF ~IsGabber("MyNPC")~ THEN DO ~Something()~ GOTO N+1
END

IF ~~ THEN BEGIN N+1
  SAY #2
  IF ~~ THEN DO ~SomethingElse()~ EXIT
END

What are we missing here? Are the initial triggers supposed to be repeated for every step of the chain? Why would that be? And why create an exit transition after the first one in a chain?

On a side note, is there a way to add the same interjection to multiple states without copy pasting it?

Edited by Skye
Link to comment

I can't answer the reason why the transitions and states are created as they are, but the most important thing is: the way it is, it will work, since the INTERJECT only fires for the condition ~IsGabber("MyNPC")~ this means the correct transaction will follow, as well. If you are really interested in why WeiDU is creating the states in such way, Wisp would be the best to explain.

The second question: I don't know whether INTERJECT supports it (and I never tried), but you could try

INTERJECT SHOAL 1 2 3 InterjectShoal
  == MYNPCJ IF ~IsGabber("MyNPC")~ THEN @1 DO ~Something()~
  = @2 DO ~SomethingElse()~
EXIT

and see what happens if you compile it.

 

Link to comment

No, neither CHAIN, nor any of the INTERJECTs, support a state list. Hence why I was asking if there's a way to do it which is not apparent.

And yeah, I know the dialog still works, but it's not "clean" and that bothers us. In the end, we added the proper states (with no extra transitions) to the dialog manually and used EXTEND_BOTTOM, which does support a state list, in order to link to those states. If there is a better (or shorter) way to do it, we haven't been able to find it.

If anyone can share some more insight on the matter, I'd love to hear it though.

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...