[SOLVED] Character name in text label question

Started by shaun9991, Wed 13/05/2015 22:24:05

Previous topic - Next topic

shaun9991

Hi guys,

Another question, any help much appreciated. I've created a custom gui system for displaying speech text at the top of the screen. This has been done by creating a gui with two labels, one for the name of the character, and one for the actual speech.

Code: ags
void Saying(this Character*, String message) {
  lSaying.Text = message;
  gSaying.Visible = true;
  //// lNameofSpeaker = ???
  lSaying.TextColor = 65535;
  this.Say(message); 
  gSaying.Visible = false;
}


My question is, can I insert some code here which will dynamically change the label text of 'lNameofSpeaker' to the Name of the character who is talking at the time?

Any help much appreciated,

Thanks,
Shaun
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

Snarky

lNameofSpeaker.Text = this.Name; should do the trick.

shaun9991

Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

SMF spam blocked by CleanTalk