Jump to content
TheGeneral2899

(MP) Display different text to different groups based on same trigger. HELP!

Recommended Posts

Hey everyone,

 

I've tried I think 30 variations of how to achieve this with no luck at all!  Any help would be appreciated!

 

Goal:  Display one line of text for one group of players (p = group this;) and another line of text to another group of players (j = group this;) once the trigger activates all of which are BLUFOR side.

 

Trigger:  Once unit (journalist) leaves certain area, ON ACTIVATION = null=[]execVM "journalist.sqf";

 

journalist.sqf (Attempt 1)

{titleText ["You must stay close to the compound!  Get back there or you will forfeit!", "PLAIN", 2]; }
forEach units j;

{titleText ["The journalist has gone too far from the compound!  Get him back there or you will forfeit!", "PLAIN", 2]; }
forEach units p;

This not only does not display the different text per group, but also will show up for any players who are playing as independent.

 

journalist.sqf (Attempt 2)

if (group player == j) then {
	titleText ["You must stay close to the compound!  Get back there or you will forfeit!", "PLAIN", 2];
};

if (group player == p) then {
	titleText ["The journalist has gone too far from the compound!  Get him back there or you will forfeit!", "PLAIN", 2];
};

Same issues here arise.  Same text for all units including those on independent side.

 

journalist.sqf (Attempt 3)

switch (side) do {
    case west: {
        titleText ["You must stay close to the compound!  Get back there or you will forfeit!", "PLAIN", 2];
    };
    case resistance: {
        null
    };
};

I've even said Ill display one generic message to only BLUFOR units, but still Independent see the text as well.

 

Please help!

Share this post


Link to post
Share on other sites

Try these out:

["You must stay close to the compound!  Get back there or you will forfeit!", "PLAIN", 2] remoteExec ["titleText",groupOwner j,false];

["The journalist has gone too far from the compound!  Get him back there or you will forfeit!", "PLAIN", 2] remoteExec ["titleText",groupOwner p,false];

Share this post


Link to post
Share on other sites

Hey jshok!

 

I appreciate the help, but no go Im afraid.  No users see anything with that method.

 

I'm even willing to settle for just one generic message for BLUFOR but it seems that IND sees the message regardless of what I do.

Share this post


Link to post
Share on other sites

Your first example looks fine imo, are you sure the groups p and j is correct?

This could however be done with triggers as well. To make it easy change the trigger act to leaving = true, then create 2 more triggers with "leaving" in the condition field and group them to respective group and have them show the message to the linked group.

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

×