SC2Mapster.com Wiki

Galaxy / Triggers / Category Chat Bubble

I'm going to be covering the basics of Campaign chat bubbles, including the benefits, the downsides, and general usage.

The benefits

  • you create chat dynamic chat bubbles similar to those seen in RPGs.
  • they can be attached to any unit
  • they can be made viewable to some players and hidden for others
  • you can change the color of the text and the background of the chat bubble
  • looks great in cinematics

The problems

  • quality chat bubbles can be very difficult to set up in multiplayer games
  • Chat bubbles can sometimes flicker in an annoying fashion

On map initialization

  • Pick each player in "Active Players" and
  • -Chat Bubble - Turn chat bubbles On for player (Picked player)
  • -Chat Bubble - Turn Merc - War Pig (Merc Marine) [8.61, 37.27] chat bubbles On for player (Picked player)

When addressing your unit in a trigger, you'll need to use these actions.

  • Pick each player in "Active Players" and
  • -Chat Bubble - Add chat bubble to Merc - War Pig (Merc Marine) [8.61, 37.27] for player (Picked player) playing No Sound Link with text "I don't know what you wa...." (Add 7.5 seconds and Face A Nearby Unit)
  • -Chat Bubble - Activate chat bubble on Merc - War Pig (Merc Marine) [8.61, 37.27] for player (Picked player)
  • -Chat Bubble - Remove all chat bubbles from Merc - War Pig (Merc Marine) [8.61, 37.27] for player (Picked player)

Basic Usage (Creating your custom 'make unit talk' action)

You'll notice when you go to use the built in campaign 'Add Chat Bubble to Unit' that it's got this horrible blue background with black text. Just the sight of it makes you want to shield your eyes! So we're going to fix that by changing it's color.

  • 1. (If you haven't already done this) Import Campaign dependencies
  • 2. Goto the trigger editor, go View/Show libraries make sure its clicked.
  • 3. Copy the 'Add chat bubble to unit' function under Campaign/Chat Bubble/Actions. Copy this to a different folder in the library because you can't edit it directly unless it's a copied version of the action
  • 4. Go down to where it says Variable - Set LineIndex = (_CB_Line_Add(Text, Black, White, Talk, No Options, (None), No Options, Sound, Duration, DurationType, FaceOption, No Trigger, No Trigger))

and just change the 'Black, White' to 'White, Black'! like this

  • Variable - Set LineIndex = (_CB_Line_Add(Text, White, Black, Talk, No Options, (None), No Options, Sound, Duration, DurationType, FaceOption, No Trigger, No Trigger))

blam you now have functional chat bubbles that don't look like crap anymore! You can set the background/foreground color to anything you want. If you want red text, you just make a different trigger that does the same thing, but with red text instead.

Variable - Set LineIndex command line add options/field values

(_CB_Line_Add(Text,

  • White TextColor (Text color)
  • Black BGColor (Background color)
  • Talk AnimationStart (Default custom animation played by the chat bubble unit for as long as the chat bubble is active)
  • No Options AnimationStartOptions (Starting animation options of the animation played by the unit when the chat bubble is executed)
  • (None) AnimationEnd (Animation played by the unit that is played when the chat bubble expires)
  • No Options AnimationEndOptions (Animation options of the animation played by the unit that is played when the chat bubble expires)
  • Sound (Sound played when the chat bubble executes)
  • Duration (Number of seconds that the bubble plays for until it's supposed to expire)
  • DurationType (Just don't change this)
  • FaceOption (Blizzard tried to make chat bubbles that would rotate based on a units facing. This was never fully implemented, and does nothing)
  • No Trigger TriggerStart (Trigger that is executed at the beginning of this chat bubble)
  • No Trigger TriggerEnd (Trigger that is executed when the chat bubble expires)

You must login to post a comment. Don't have an account? Register to get one!

Table of contents

  1. 1 (_CB_Line_Add(Text,

Facts

Date created
Oct 30, 2011
Last updated
Oct 30, 2011

Author