Forum rules - please read before posting.

Extending ActionSpeech

Hello! I'm trying to extend ActionSpeech as a Custom Action, so I can select characters from a drop-down instead of dragging the Char prefab across. It nearly works, but doesn't.

1. I can't get the character to say it, it only comes up in white (narrator/ subtitle?) instead of above the character's head. I assume it's because the speaker isn't being set somewhere?

2. Returning 0 from Run() causes any 2nd line / separated line in messageText to not play. Returning -1 gets the debug into (and, I guess, Run()) called hundreds of times.

Anyway. Is this at all even possible and if so, a heads up would be AMAZING. The extended class as it stands is here: https://pastebin.com/CC3HxWRy

Thanks!

Comments

  • Ah- progress. Shifting the speaker assignment from Run() into AssignValues before the base is called sets the character up perfectly. Works a charm.

    Any help on issue 2 would be much appreciated!
  • Aaaand I'm an idiot. No need for the overriding Run function anymore, which fixes the issue.

    Simple template for an extendable ActionSpeech in case anyone needs it: https://pastebin.com/gZQikSBH
  • Thank you!  There is a community wiki for such scripts if you'd like to share it, I'm sure it would be appreciated.
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.