Jump to content
Sign in to follow this  
frankiie

Make units join group leader.

Recommended Posts

I don't know how to put this exactly but ok, I'm having a mission where you're playing as the team leader, and Im having you lead a team to rescue some bLufor prisoners of Opfor. I have a trigger which will activate once you're in it which will automatically transfer those units to your group, so you can lead them outa there of course.

But the trigger only activates when my team leader "TeamLeader1" is there, Is there a script so that when any group member activates the trigger it automatically sends them to whichever group leader that is present? (Because what if you're "TeamLeader1" and you die, and just switch teammates, it automatically makes another unit Team leader, making it where you can't add them to your group now.

Anybody can help me with this? kinda hard to explain but I can further explain if needed.

btw what's in the trigger atm is just "[blueforPrisoner1] join TeamLeader1"

Share this post


Link to post
Share on other sites

Add to the team leader's (or any group member's) initialisation:

playergroup = group this;

And then switch TeamLeader1 to playergroup in the join line. That way it just looks for the group instead of the specific team leader.

Share this post


Link to post
Share on other sites

This is how I do it.

First put this in your group leader (your own) init.

grp_ALPHA = group this; THIS setGroupId ["ALPHA SQUAD"];

The first part names your group to the game. the second will name your whole team with team name. Like in the team switch. Both are useful for group joining at different times.

Now on your trigger you can figure out which suits you best.

[_unitOne, _unitTwo] join (group player); this one I use a lot. It's quick and easy. It will make anyone join the group the player is in. But I think it makes you the leader even if you have a leader. I usually use it on a radio command so I am already leader. But for single player who use team switch a lot. As the game winds down it helps clean up any squads with one or two units into bigger squads.

[_unitOne, _unitTwo] join grp_ALPHA; It lets them join whichever group you want regardless of you.

Share this post


Link to post
Share on other sites

thanks for the replies!

I've seem to get it working now :D Thanks alot.

Share this post


Link to post
Share on other sites

Ok I've read this post and several others but I still can't get what I want done. I have a mission where I want unit G1, to join the players unit even after the starting player unit P1 might have been killed and the player has switched to another unit in that group, P2, P3, P4 etc. I can get G1 to join the original player unit P1 but if that unit dies and the player switches to another unit in his group then I can't get G1 to join that now active player unit. Also If the original player unit dies and the player switches to another unit in the group that unit or any other unit other than the original one can not see the obj's to take them. Is there a fix for that as well?

Share this post


Link to post
Share on other sites

Just do what was advised in posts 2 and 3. You want the unit to join the group, not the unit, since that'll be around as long as any of the members is alive.

Share this post


Link to post
Share on other sites

Ok.. Finally got it figured out. I was doing some things wrong and not understanding what the posts were saying. Now everything is working great.

Thanks all,

ScalpelOne

Share this post


Link to post
Share on other sites

Reviving an old thread...

Could someone please take me through the ini line, and trigger on act for joining two player squads to each other at a trigger location. There will be only players in the squads.

So far i have two groups of 4 men.

Alpha that has a module for set callsign to Alpha 1 1. the group leaders name is "alpha1" and in his ini line is "this setgroupID ["Alpha"];"

Bravo that has a module for set callsign to Bravo 1 1. the group leaders name is "bravo1" and in his ini line is "this setgroupID ["Bravo"];"

Then i have a trigger with a radius of 100x100 that has on act: "[bravo1, bravo2, bravo3, bravo4] joinsilent alpha1"

It works like a charm in single player with AI, but not at all in Coop.

Please help out :D

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  

×