OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: James Spence 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.
-
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 -
sergeant_loon sidechat format["%1, you can drive!", player_name]
There are tutorials in the Editors Depot on constructing dialogs.
-
Cool, thanks alot Bedges. :D
-
Depends how you call it...
You can use name _unit which should output Acecool
name Player might work too...
-
How about
sergeant_loon sidechat format ["%1 you can drive!", name player]