Jump to content
Sign in to follow this  
combataz

Scripting Text at Trigger including Time and Profile Names

Recommended Posts

Hey all. I'm trying to setup a trigger that displays text at the bottom left of the screen, with three strings, the current time, and the profile name of the player playing (It is for multiplayer, but from what I understand the profileName will work in mp?). How would I go about doing this?

Share this post


Link to post
Share on other sites

you can simply call a function from the trigger to run on the clients. how do you want it called exactly and for who do you want it to be shown to?

heres an example of what i mean

BUF_DisplayText =
{
	_profileName = profileName;
	systemChat format["Time: %1   ProfileName: %2", time, _profileName];
};

 

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, gokitty1199 said:

you can simply call a function from the trigger to run on the clients. how do you want it called exactly and for who do you want it to be shown to?

 heres an example of what i mean


BUF_DisplayText =
{
	_profileName = profileName;
	systemChat format["Time: %1   ProfileName: %2", time, _profileName];
};

 

Players are on the Independent side. It'll be when a unit crosses a trigger delineating the start of the mission area. Am I able to throw strings into that function as well?

Share this post


Link to post
Share on other sites
29 minutes ago, combataz said:

Players are on the Independent side. It'll be when a unit crosses a trigger delineating the start of the mission area. Am I able to throw strings into that function as well?

you can put whatever you want in it. so each time a player enters the trigger you want to display text to everyone showing who entered the trigger? or do you want it to only display who entered the trigger first to everyone or what? that part is still unclear to me

Share this post


Link to post
Share on other sites
6 minutes ago, gokitty1199 said:

you can put whatever you want in it. so each time a player enters the trigger you want to display text to everyone showing who entered the trigger? or do you want it to only display who entered the trigger first to everyone or what? that part is still unclear to me

Ah, sorry, apologies. I want it to be displayed to everybody. 

 

Follow up question, are transition effects a thing for something like this? A fade in, for example.

Share this post


Link to post
Share on other sites
1 hour ago, combataz said:

Ah, sorry, apologies. I want it to be displayed to everybody. 

 

Follow up question, are transition effects a thing for something like this? A fade in, for example.

assuming i understood you correctly, call this on the first person who enters the triggers client and it will broadcast the system chat to everyone. not with systemChat no, you would need another form of displaying the message for that(afaik)

BUF_DisplayText =
{
	_profileName = profileName;
	_str = format["Time: %1   ProfileName: %2", time, _profileName];
	_str remoteExec ["systemChat", 0, false];
};

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×