Home   Help Search Login Register  

Author Topic: Player name in groupChat, titleText etc.  (Read 1291 times)

0 Members and 1 Guest are viewing this topic.

Offline James Spence

  • Members
  • *
Player name in groupChat, titleText etc.
« on: 13 Aug 2008, 00:29:03 »
Hi, I'm making a campaign where the player would play as himself (I mean with his username). Is it possible, when i'm having a person talking to him on the radio or in titletext, for him to say the username of the player playing?

i.e. I would have my officer say, "X, you can drive."

X being the player's user name.

Thanks, Jamoose.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Player name in groupChat, titleText etc.
« Reply #1 on: 13 Aug 2008, 08:28:21 »
You would have to construct a dialog with a text box and show it at the beginning of the mission. Whatever the player typed into the box would be held in a global variable and used in the radio/titletext messages -

Code: [Select]
sergeant_loon sidechat format["%1, you can drive!", player_name]
There are tutorials in the Editors Depot on constructing dialogs.

Offline James Spence

  • Members
  • *
Re: Player name in groupChat, titleText etc.
« Reply #2 on: 13 Aug 2008, 11:45:17 »
Cool, thanks alot Bedges.  :D

Offline Acecool

  • Members
  • *
Re: Player name in groupChat, titleText etc.
« Reply #3 on: 13 Aug 2008, 23:12:38 »
Depends how you call it...

You can use name _unit which should output Acecool

name Player might work too...

Offline Sparticus76

  • Members
  • *
Re: Player name in groupChat, titleText etc.
« Reply #4 on: 12 Sep 2008, 08:45:16 »
How about

Code: [Select]
sergeant_loon sidechat format ["%1 you can drive!", name player]