Jump to content
TURCO_AR

[SOLVED]Show hint to a squad team only

Recommended Posts

Hi! I'm starting using the Eden editor to learn how to create a simple mission for multiplayer. Just to start learning about creating mission.

I'm stuck with a trigger/condition situation. I have two teams, ALFA (5 units) and BRAVO (6 units) with their own objectives. What I want is that when ALFA completes its objective (kill a bad guy) a hint says "Good Job! Move to extraction point". Show it only to the units of ALFA team, not for BRAVO.

I put in the init of the ALFA leader: ALFA = group this. In the trigger condition tried with ALFA in thisList, but nothing happened.

Some charitable soul who can give me a hand.

Share this post


Link to post
Share on other sites
if(!alive enemyunit1) then {
   {hint "Good job, move to the next objective!"; } forEach (units ALFA);
};

this should work well. This may not be the best way to do so though, hopefully someone else gets to see this and throw their ideas in as well.

But this should be local to each unit in the group.

 

Share this post


Link to post
Share on other sites
5 minutes ago, Midnighters said:

if(!alive enemyunit1) then {
   {hint "Good job, move to the next objective!"; } forEach (units ALFA);
};

this should work well. This may not be the best way to do so though, hopefully someone else gets to see this and throw their ideas in as well.

But this should be local to each unit in the group.

 

Doubt this will work.

Add a check like this, then it will:

if (player in units ALFA) then {hint "something something hint"};

 

Cheers

Share this post


Link to post
Share on other sites
10 hours ago, Grumpy Old Man said:

Doubt this will work.

Add a check like this, then it will:


if (player in units ALFA) then {hint "something something hint"};

 

Cheers

Awesome. Yeah this was off the top of the head, thanks for clarifying. 

Share this post


Link to post
Share on other sites
12 hours ago, Grumpy Old Man said:

Add a check like this, then it will:


if (player in units ALFA) then {hint "something something hint"};

 

Cheers

This works perfect!

Thank you! 

Share this post


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

This works perfect!

Thank you! 

 

I am glad it works, however, I would like to know does it only appear to Alpha units or do all players online see it. Because i tried something similar in which i wanted only a person who activates the trigger to see the hint but got surprised when other people saw it too. 

 

Cheers

Share this post


Link to post
Share on other sites
11 hours ago, BlacKnightBK said:

I am glad it works, however, I would like to know does it only appear to Alpha units or do all players online see it. Because i tried something similar in which i wanted only a person who activates the trigger to see the hint but got surprised when other people saw it too. 

 

Cheers

Depends on how you set it up.

 

Cheers

Share this post


Link to post
Share on other sites
1 hour ago, Grumpy Old Man said:

Depends on how you set it up.

 

Cheers

 

well i will try the way above soon :)

 then i will ask a friend to help me test it

 

Cheers

Share this post


Link to post
Share on other sites
On March 15, 2017 at 9:39 AM, Midnighters said:

if(!alive enemyunit1) then {    {hint "Good job, move to the next objective!"; } forEach (units ALFA); };

hey @Grumpy Old Man can you clear up as to why this wouldn't work? I'm trying to build good practices. 

what's the difference from it to :

if (player in units ALFA) then {hint "something something hint"};

 

Share this post


Link to post
Share on other sites
Just now, Midnighters said:

hey @Grumpy Old Man can you clear up as to why this wouldn't work? I'm trying to build good practices. 

what's the difference from it to :


if (player in units ALFA) then {hint "something something hint"};

 

 



if(!alive enemyunit1) then {    {hint "Good job, move to the next objective!"; } forEach (units ALFA); };

Will execute the hint n times if the enemy is dead, n is the amount of units in the ALFA group.

Depending on where the statement is called, it will run on every client and server.

The player variable is different on every client, checking if the player is inside the group ALFA will only display the hint for players that are in the ALFA group, pretty basic actually.

If you run my check on the server then only the host will see the hint, if he's in the ALFA group.

On dedicated servers the player is null, so you'd need to call this function remotely on every client in that case.

 

Cheers

Share this post


Link to post
Share on other sites
1 minute ago, Grumpy Old Man said:

 




if(!alive enemyunit1) then {    {hint "Good job, move to the next objective!"; } forEach (units ALFA); };

Will execute the hint n times if the enemy is dead, n is the amount of units in the ALFA group.

Depending on where the statement is called, it will run on every client and server.

The player variable is different on every client, checking if the player is inside the group ALFA will only display the hint for units that are in the ALFA group, pretty basic actually.

If you run my check on the server then only the host will see the hint, if he's in the ALFA group.

On dedicated servers the player is null, so you'd need to call this function remotely on every client in that case.

 

Cheers

Right, that makes sense. Just needed some clearing up on that. I knew it had to do something with executing multiple times on the wrong players.

Thanks for this, appreciate it.

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

×