TankCommander 3 Posted January 16, 2009 I'm making a large coop capture the island type mission, and I'm trying to get some armoured units to sit in a standby mode in order to reinforce other units when need be. What I'm aiming for is that the trigger has a large area which encompasses other units and what I'd like to have is that when these other units get attacked, the reinforcements come in to help. So far I've had no luck where basically all reinforcements on the map head to the combat area. I just want them to be active in their smaller regions. Any one know a solution? So far: Trigger which detects BLUFOR and linked to guard waypoint on reinforcements. Tried many variations with no success. Share this post Link to post Share on other sites
tj72 0 Posted January 16, 2009 First I would make smaller triggers instead of one big one. You could have a smaller trigger following a patroll group with a looping script that setpos on the group leader every couple seconds. The trigger could fire a script that links to a specific reinforcement group or groups so that you could separate the patroll areas with the groups that support them. So you start with one patroll infantry group and one reinforcement group and one trigger for this patroll: Make a patrol group and call it patrol1 (init the leader with: patrol1 = group this) Make a smaller trigger and call it trig1 (Detected Enemy trigger as you allready have done) Make a tank group and call it reinf1 (init the leader with: reinf1 = group this) When you size the trigger try to make it as big as a soldier could see where incoming fire is coming from. If you were being shot at in the island how far away could you see enemies shooting at you? However many meters you think that is is your trigger size. Â Could be 1000 meters or more but thats your decision. Â The point is a smaller trigger will use less resources than a bigger one and will help you make this system more modular and robust. Make a txt file in your mission folder called init.sqs and put this code in it. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [patrol1,trig1] exec "patrol.sqs" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _patrol = _this select 0 _trigger = _this select 1 #START ~1 _trigger setpos getpos leader _patrol_group ? count units _patrol == 0: goto "End" goto "Start" #END deletevehicle _trigger exit Note how I'm checking for the leader of the group on every loop. This accounts for the leaders death because ARMA will just reassign the next unit as leader and the script will still have a valid variable to check against. Also note how I'm counting the units every loop so that if the whole group is dead the script exits and stops taking up resources needlessly. Also the trigger deletes to save a bit more resources. In the trig1 on activation field you put this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [patrol1,reinf1,trig1] exec "reinforcements.sqs" Create another .sqs file in your mission folder called "reinforcements.sqs" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _patrol = _this select 0 _reinf = _this select 1 _trigger = _this select 2 _list = list _trigger _target = _list select 0 _reinf move getpos _target Basically thats it, what this will do is get the tank group to move to the position of the detected enemy wherever it may be. (Provided the destination is reachable). Â The default behavior should get the Tanks firing at enemies if they are still in the area. Then you have to figure out what will happen beyond that point, such as what will happen when the area is cleared, but this should get you going. Now you can simply add more groups with incremental names and give them specific reinforcement groups. Just make another set of groups/trigger called patrol2, reinf2 and trig2 and repeat because the scripts will use whatever paramaters you feed them and work the same every time. Make as many groups as you want this way. You could also use the same reinf group for multiple patrol groups but you might have concurrent reinforcement requests that will leave one of your patrols out of luck. Share this post Link to post Share on other sites