Forum rules - please read before posting.

Ability to "reference" lines?

This is more of a suggestion/discussion point.

I was thinking it'd be cool if you could reference lines inside of action lists rather than having to explicitly specify them within the action list, which will (implicitly) create a new line every time.

Quite often I need to have a character say the same thing in different action lists.

Currently the two solutions (that I've found are):

- Duplicate the text and the corresponding speech file (waste of ram/hdd space)
- Create a new action list, stick the duplicated line(s) in there and call it from the action list that I want to use it in (less/no waste, but somewhat cumbersome)

A third solution would be to have the ability to "edit" the ID part of a Dialogue action in some way, so as to point it to another, pre-existing, line (so basically it's a "Reference Dialogue Action" rather than a default dialogue action)

Thoughts?

Comments

  • I do see your point, but on the other hand, the speech Action's already gotten quite fat, and I'm not sure about adding such a feature officially, as 99% of users wouldn't need it.

    You can, however, modify the action very easily to expose the ID yourself. Open up ActionSpeech.cs, and find the ShowGUI function.

    Replace:
    if (lineID > -1)
    {
      EditorGUILayout
    .LabelField ("Speech Manager ID:", lineID.ToString ());
    }

    With:
    lineID = EditorGUILayout.IntField ("Speech Manager ID: ", lineID);
  • Great, I'll give that a go, thanks Chris!
  • Actually one thing I just noticed somewhat randomly is that if you copy paste a Dialogue: Play Speech action into a different actionlist it will preserve the Speech Manager ID of the original Play Speech

    Which basically has the exact same effect as the functionality I am looking for...

    Should I be doing a little victory dance? Or does this actually risk failing at some point down the line? (maybe when I refresh all text again or something such duplicated IDs will change?)
  • If it works, that's a good idea!  I'm not actually sure how that would affect the Speech Manager, though - I'll run a test of my own.  Certainly it won't be reset so long as you stay away from the "Reset lines" function.
  • I understand that this:

    Replace:
    if (lineID > -1)
    {
      EditorGUILayout.LabelField ("Speech Manager ID:", lineID.ToString ());
    }

    With:
    lineID = EditorGUILayout.IntField ("Speech Manager ID: ", lineID);

    It is only working for ONE lineID

    What happens when we have multilineIDs?
    How we can change them then?
  • Just reference the multiLineID array instead:

    for (int i=0; i<multiLineID.Length; i++)
    {
      multiLineID[i] = EditorGUILayout.IntField ("MultiLine ID #" + i, multiLineID[i]);
    }

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.