Jump to content
Sign in to follow this  
ColeMinor

Reinforcements?? what options do we have?

Recommended Posts

Hey guys,

I have seen a few threads on reinforcements, however i havent seen any that actually tell you how to go about doing it.

Im using the SOM for something, i cant recall what it was, perhaps for ammo drop, but i have pasted that bit of code in that disables the random missions, that also seems to also disable reinforcements. If you know of a way to allow reinforcements but disable random missions that would be great!

Im currently making a mission where you have your squad as well as 2 squads under your command (via the command module), you have a very long battle in which you inevitably lose a lot of your troops, I would like to be able to call in reinforcements when you have lost a certain number of troops, like 6 or more. I would also like to be able to reinforce the other 2 squads you command.

Any ideas on how I can accomplish this?

I had a few (lame) ideas like once you reach a certain point in the mission some reinforcement squads will meet you at a designated spot and join your squads (with joingroup commands or something, im pretty sure its possible) thus reinforcing them, thats pretty basic though I would like it to be a bit more dynamic and realistic than that if possible. Also, if by chance you didnt lose many guys then when they join you you would now have a massive squad, which is ridiculous.

So as you can see im stuck as to what i should do next, any help would be appreciated! This mission has a lot of potential but i want to do it right.

thanks guys!

Edited by Drow09

Share this post


Link to post
Share on other sites

{alive _x} count units groupnamehere == 3

the above code checks how many troops are left in your group, so it is checking if there are 3 troops in the group. You can change that number to whatever you want.

You would place the above information into the condition line of a trigger. This way when your group starts to get killed your reinforcements would be triggered and move in to assist.

You can have units join your group by using this in a trigger.

Hopefully this helps or at least gets you going in the right direction.

Share this post


Link to post
Share on other sites

thanks alot, i'll work with that and see what i can do. Any idea how I could make the reinforcements know where you are and come to you?

Anyone else with ideas is more than welcome to leave their 2 cents too.

Thanks

Edited by Drow09

Share this post


Link to post
Share on other sites

you could do it dynamically with a script (this won't be elegant, as I'm making it up on the fly):

_AbleToFight = true;
while {_AbleToFight} do
{
   if ({alive _x} count units _mygroup <= 3) then
   {
         _AbleToFight = false;
   };
};

null = [unitLeader] execvm "Reinforce.sqf";

contents of Reinforce.sqf does the following:

1. Spawn reinforcement units (possiby at a marker location, or simply in a helicopter that is also spawned say 1km north of the unitleader)

2. Assign the position of the unitleader as the destination of a move waypoint

3. Waits until the reinforcements are within a certain radius of the unitleader

4. Makes the reinforcements join the group of the leader

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  

×