Jump to content

Scripting help


Recommended Posts

Originally Posted By: Lazarus.
Check the dialog script for errors?

Edit: Initiate the dialog tree from the talk state and see if it still screws up. If not, and it only screws up from the start_state, then thats pretty weird. Are you running any code in the node that it freezes at?

As I said, the dialog tree works fine when initiated from the talk state. There is no coding in any of those nodes. No matter how I initiate the dialog from the start state, it keeps stopping at the second node. The weird thing is that I have three different NPCs using the same script and it only works for one of them.
Link to comment
Share on other sites

Small update:


I thought the error might not present itself on the first dialogue tree activated (as the first tree is the only one that currently works with the script). I bypassed the first dialogue tree in the start state so that the problem dialogue was the first activated in the scenario. This removed the error.


I then tried activating the dialogue in a different fashion. I started the scenario by activating the first tree and then having code at the end of that tree set the appropriate flag to start the next dialogue tree. This removed the error.


This convinced me that the problem lay in how I set the flag that activated the appropriate dialogue tree. Oddly, though, there are no differences between the encounters that activate either tree. Even more oddly, I have a third encounter that uses the forcetalk script. When I bypassed the events to activate its dialogue tree at the beginning of the scenario, the error still presented itself.

Link to comment
Share on other sites

The best way to monitor flag use is to put some code in the start_state that repeatedly prints the flag(s) you're concerned with, so you can see if it's the value you expect it to be. (Well ok, that's more like the easiest way rather than the best way. The cleanest way would probably be to add a special ability or something that lets you input sdf coords and outputs sdf values.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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