Jump to content
owmyeye

How can I make AI units move in MP sector control game with respawning?

Recommended Posts

I'm trying to make a basic sector control 'MP mission' to play against the AI.

There are 2 teams which start at either end of a town and compete for the sector in the middle.

What is the best way I can make the AI units move into the sector?

I've tried straight attaching a cycle of waypoints to each of the units, but weirdly enough only some of the units return to the waypoints when they respawn. Out of 8 units (in a team), about 3 or 4 will simply crouch at the respawn and never move to the waypoints again.

I've also tried linking the units to 0 probability squad leaders to make them grouped but get the same results.

I then tried making the squad leaders 100% probability but put them inside inaccessible buildings (using the Chernarus AA2 map). I was hoping the units would then try to re-group with the leaders back in the sector, but same result again.

I tried making a triggers (which are only activated by 1 unit each) to spawn a waypoint when they return to base, but that only works for the first time and then the unit doesn't activate the trigger anymore- I know this because the trigger had a text message which didn't appear after respawning but did before (and yes it's set to repeated not once). Using my unexpert guessing, I'd say maybe the units lose their name after respawning.

Being a n00b as it is, i've run out of ideas to try. Can someone please help?

Share this post


Link to post
Share on other sites

So I decided to make the units each have an init command which joined a leader and tested it to see what would happen. The players joined. When they died, they respawned back into the team and back as the same number. When I respawned the squad leader, they carried on leading.

Here's the weird bit though. I shot one of the 2 units in the test squad- they respawned and followed me again. I shot the other one and the same. However, I shot 1 of them again- and they stopped moving after respawning. They were still in the squad but just crouched and didn't respond to move orders. The regroup order was absent because they were apparently already following.

I tried to recreate the flaw again and try to figure out if it was a consistent or random number of times the AI died before being stuck- but that got messy when team mates started shooting me, even after i respawned. They also started shooting each other.

To get around this, I made some radio triggers to kill the squad members without me shooting them and incurring revenge. Wierdly enough, no matter how many times I radio killed them, they kept following me. So for some reason they get stuck when they are shot but not when they are setdamage 1.

Editing ARMA makes me want to pull my hair out :angryfire:

I'm wondering if it will be the same results if I placed the AI as unplayable units and then replace them using triggers to spawn new AI when their death is detected....

Share this post


Link to post
Share on other sites
Take this example mission:

https://www.mediafire.com/?d33e72q14hg24wo

And change the mission from support to sector control, and delete support base modules or whatever.

Uh, and it has some of my modifications in there, so you might want to change that 0_0 lel sorry

I tried to have a look but I can't open it in the editor, due to mods I suppose. I took a quick look at the files but I don't know what i'm looking for in that stuff- if what i'm looking for is actually there (not in the editor).

Share this post


Link to post
Share on other sites

Ok I've figured out how to make it work- but I really don't know why it didn't work to begin with.

So anyway, the solution to AI getting stuck at respawn is to place them initially in the editor as unplayable (so they don't automatically respawn as per the game mode) and then set triggers to count their death to deduct tickets and respawn a new unit back at the base.

Something about this breaks the sequence which gets stuck after respawning.

This solution isn't useful (not without more work) for people who want all the player slots to be open for human or AI. It's also no good for the human to choose which team they want- I have to make a different version for each since the solution involves not using "playable" or "player" on any unit which the 1 human player is going to play (or else those marked that way and not used by a human will be stuck).

As for moving the unit's to the sector, I just made each team have a group leader with a waypoint cycle in the area.

Share this post


Link to post
Share on other sites

Hi I'm new to Arma 3. I am having a similar issue. I'm trying to also use Eden to make a basic sector control map that can be used for jumping in with the AI or used for a PVP  on my server.

 

I have 3 sectors, and Opfor and Blufor, and spawning 6 players on each side and are linked to an AI Spawn. When the AI unit spawn the first time they go and properly capture the closest sector.

 

The problem is when they get kill off, and more units start spawning at the home base, they just get stuck there, and often will just lay down on the ground.  I want the AI units and PVP units to respawn and join the attack from their home base when they die.  

Share this post


Link to post
Share on other sites

I was also wandering if anyone could help me with an issue similar to this thread. Is there a code or script or anything that makes AI units go to a randomly chosen sector without using pre-placed waypoints? I just feel preplaced waypoints make the battle too predictable.  I'd like the AI to go to a sector Randomly.  As far as respawning goes, Im using the Jebus script to respawn pre-placed units because while I want them to go to random sectors, I don't want the actual units and loadouts to be random,  so no use for the spawn AI module 

Share this post


Link to post
Share on other sites

Yeah there is something wrong with it. I've had the same problem using editor placed waypoints and also using GAIA. For the latter, I have seen that the commanders still have the GAIA active (so should be setting waypoints) but just lay down at spawn. Something about respawning crashes their use of waypoints. 

Share this post


Link to post
Share on other sites
10 hours ago, MitchyG117 said:

I was also wandering if anyone could help me with an issue similar to this thread. Is there a code or script or anything that makes AI units go to a randomly chosen sector without using pre-placed waypoints? I just feel preplaced waypoints make the battle too predictable.  I'd like the AI to go to a sector Randomly.  As far as respawning goes, Im using the Jebus script to respawn pre-placed units because while I want them to go to random sectors, I don't want the actual units and loadouts to be random,  so no use for the spawn AI module 

Hey that's an idea: Jebus instead of the respawn module.

 

What you are looking for is MCC Sandbox mod and it's "GAIA" AI control. In it, you place zones (by placing round or square markers to the size/location you want) and then insert an init command into squad leaders. They can be told to attack ("Move" command), defend ("NoFollow"), or fortify ("Fortify") the zone they are assigned to. Attack means they will move freely in and out of the zone, pursuing enemies, flanking, and working with other friendly squads. They are unpredictable and actually tactful. The defend will have them go into the zone but not leave it. In the zone they will set up patrols and when the enemy is detected (by a friendly squad) they will react and chase down the enemy within the zone. Again they work together, flank, etc. The fortify command they move into the zone and take up positions in buildings and cover. They will use any static weapons placed too. 

 

Jebus actually has built in support for MCC, so instead of using the regular MCC init, you add to the Jebus command to use MCC. 

 

Here is an example from the Jebus instruction guide: 

Quote

0 = [this, "CACHE=, 500, "GAIA_NOFOLLOW=", "3] execVM "Jebus.sqf";

 

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

×