I was looking for a way to make the conversations my characters were having look much nice and be easier to replicate; so I decided to put this together.
The initialization of the dialog removes the standard UI and has the Portrait and Text Box move on screen and lock into place before it's ready to handle a 'Transmission.' While modeled after how a Transmission plays out, these do not actually count as Transmissions for purposes of triggers. The font of both the speaker's name and the text is adjustable and I've provided a couple of 'optional' functions to change a couple of things.
I have not testing this on multi player, but it should function just as it would on single player; except that all players are roped into seeing the same thing and that any player hits to key to progress the conversation, it should move it along for everyone.
I do intend to update this when I'm finished with my map so I would love some suggestions. Also, if you know how to hide all of the global variables I use in the library let me know, since there are over 10 and they may muddle up someone's variable list.
These are the actions that are ran to use the trigger:
- Manual Conditions
- Key Press Override
- Font Override
- Speaker Name X Offset
- Speaker Name Y Offset
- Speaker Text X Offset
- Speaker Text Y Offset
- Transmission Initialization
- Transmission Text
- Transmission Termination
This is pretty basic; set to the default of 'false' a key-press is required to end a transmission message. The default keypress is the [space] key. In the Youtube video I had this set to true and was using the 'wait for condition' and 'wait' triggers to move from one tranmission to the next.
Key Press Override
If you have Manual Conditions set to it's default you can use this to change it from the [space] key to whichever key you would prefer.
Not happy with the font I'm using for the default, this will let you change that. This is a list of Starcraft 2 Fonts
Speaker Name,Text X,Y Offset
I broke this down into four different triggers, just in case you only needed to use one at a time. Basically this is most useful if you use a font of your own choice that ends up moving the text out of the dialog box. It can also be used if you're not happy with the default positioning.
This is only used once per conversation and the only important Variable is the true,false bolean. Set to false, the units will still be able to move around, set to true and all units, friend and foe alike, are paused. In the Youtube video this was set to false and I manually made the unit uncommandable, since I still wanted him, and the other unit to be able to walk. The Triggering Unit variable is for future implementation.
Transmission Text(No Text, No Game Link, No Text)
This trigger is the main one and it used for every message. The Variables are very straight forward: name of the person talking, the portrait you want to use for them, and what you want them to say. If you have default conditions you can just have all of these in a row and hit [space] to move on to the next message. In my Youtube video there was stuff happening between each of these and since I had 'manual conditions' on I also had to but time in between each one, otherwise it would have just ran through them all instantly.
Pretty self explanatory. Once you're done with the conversation just have this trigger at the end of it all and it will end.