Jump to content
Sign in to follow this  
Kazevura

AI Respawn problems

Recommended Posts

Hello there my first post here, I've been following a lot of posts from this forum since last month but never really got to register. Well as you can see, I did, but for a reason... there is a problem I can't solve, I've checked thousands of posts within this forum and outside regarding this issue but they don't really explain what I'm doing wrong.

I wanted to respawn AI units so I could make a continuous battle in a map. Great, got to download some scripts from UPS, Nirron and Kronzky which respawn the AI, AI vehicles and adds them waypoints. The problem is, they only patrol markers, motorized infantry or mecha, after respawn, they don't seem to enter the vehicle within the group anymore, actually they don't seem to be a group at all. I've tried to add Init commands like moveincargo, driver, gunner... but they don't work once the unit have been respawned, I also tried to change from In formation to In cargo, no results. Tried to plot waypoints for a group to move as they respawned, no results. Not really experienced in scripting but I had a fair background in python before and looked up the scripts, tried to change something here and there but I'm new to ARMA and I don't know what are my possibilities here... If they are obvious, then I'm sorry, I'm stupid.

Also... I've tried changing the leader to the vehicle, tried to add empty vehicles and then commanding the group to GET IN, didn't work. Also tried to add waypoints and set them as "Get In Nearest" when the units respawned in the same area the trigger was, didn't succeed.

Seriously? What am I doing wrong? Beyond the above measures I've tried thousand more, searched over and over but didn't find anything for at least 7 hours looking...

I'll check this post daily, thanks in advance!

Share this post


Link to post
Share on other sites

Can you maybe post what you have so far? You mention using a lot of different methods so it's hard to tell what the problem is.

Share this post


Link to post
Share on other sites
Can you maybe post what you have so far? You mention using a lot of different methods so it's hard to tell what the problem is.

Yes, well I'll put it into topics:

1 - As the script says, I'm supposed to type into de init of the units or groups, or group leader only, a command to make them execute the script. If I insert it in the leader it will work for the whole group. I've typed it and yes it works. But not if there's a vehicle along with the units, they man it firstly, but after a respawn, they don't, but still accompany the vehicle though they do not use it as a means of transport which is the idea to be executed.

2 - As a solution, I came up with the idea to spawn the units already "In Cargo", didn't work. Tried to write "MoveInDriver" for the leader and then "MoveInCargo" for the units, it works for the first spawn, after the respawn units spawn around the vehicle and do not enter it, even if I have set the vehicle as leader, my theory is that if it uses clones, it will change the leader, group, or behavior, something like that.

3 - I started then trying to make the units spawn outsite the vehicle and then using a waypoint to get into it, again, it only works for the first time, even if the vehicle is spawned first.

4 - Tried to use a trigger because I thought that when units would respawn in the trigger area it would activate, adding waypoint to their init automatically using "addWaypoint" and "setWaypointType" in order to make them use "Get In Nearest" before going to the patrolling marker as the script commands them to, but the trigger doesn't seem to work as well (Probably because I did something wrong, please note that I've been messing with the editor for 4 full days, I still got much to learn.)

5 - Tried to simply stablish waypoints to units thinking that units may execute it firstly and them execute the script from UPS, they don't, they go straight to business. I have the most updated version from UPS.

6 - Thought it was some sort of version conflict between the scripts, the respawning one and UPS although they were made for each other, I could find a vehicle dedicated script only using UPS, as a result the soldier piloting the vehicle actually (re)spawns inside the vehicle and carry out the orders, but the gunners and cargo are left behind even if I once again insisted on setting the pilot as the team leader.

7 - Tried to change the position of commands in the init of the units because I thought the unit would queue them up, no change.

8 - Tried to leave only the number os respawns, delay of these, and respawn marker only (without the destination marker) as parameter in the init and them set waypoints manually without the whole patrolling feature, the waypoint gets deleted, like I said it seems like they're clones it doesn't matter what I do or command by editor, the commands will get deleted. And some post, somewhere was mentioning this, and also I've checked the scripts and they do create clones, I've made a test to confirm it and put every command in every unit and vehicle of a motorized infantry, result is a lot of damn units than initially were there.

9 - Finally, been trying to set a "Load" waypoint, "Transport Unload" from other units, but no success.

There are minor details that I might have changed to test if it worked, but I can't remember now, I can't even count.

Sorry for any mistakes in English.

Edited by Kazevura
Grammar Mistakes

Share this post


Link to post
Share on other sites
I could find a vehicle dedicated script only using UPS, as a result the soldier piloting the vehicle actually (re)spawns inside the vehicle and carry out the orders,

AI vehicle respawn patrol area using UPS

http://www.armaholic.com/page.php?id=6543

Ai will spawn get in the vehicles, be it humvee, tank, or chopper, and move to the waypoint, I've used this alot in my mp missions,

but this script comes with a demo.

Share this post


Link to post
Share on other sites

Yeah I've been using that one, the problem is that when it is a cargo vehicle, other units won't get into it (after respawn), only the driver will spawn and patrol a specific marker while within the vehicle. Is there any way to tweak the mod to do it?

Share this post


Link to post
Share on other sites

In the script: AIvcl_respawn_UPS

_guy = _unitsGroup select _loop;

_guy setSkill (_AI_skillArray select _loop);

if (_loop == 0) then {_guy moveInDriver _vcl_new};

if (_loop == 1) then {_guy moveInGunner _vcl_new};

if (_loop == 2) then {_guy moveInCommander _vcl_new};

somehow add

if (_loop == 2) then {_guy moveInCargo _vcl_new};

cant say that will work but its worth a try.

Share this post


Link to post
Share on other sites

Whatever problem was happening probably could have been fixed by now if you'd posted the code instead of just words. :)

hint "Just saying..'';

Share this post


Link to post
Share on other sites
In the script: AIvcl_respawn_UPS

_guy = _unitsGroup select _loop;

_guy setSkill (_AI_skillArray select _loop);

if (_loop == 0) then {_guy moveInDriver _vcl_new};

if (_loop == 1) then {_guy moveInGunner _vcl_new};

if (_loop == 2) then {_guy moveInCommander _vcl_new};

somehow add

if (_loop == 2) then {_guy moveInCargo _vcl_new};

cant say that will work but its worth a try.

I had the very same problem and tried many different options. I changed the respawn.sqf and added

_guy = _unitsGroup select _loop;

_guy setSkill (_AI_skillArray select _loop);

if (_loop == 0) then {_guy moveInDriver _vcl_new};

if (_loop == 1) then {_guy moveInGunner _vcl_new};

if (_loop == 2) then {_guy moveInCommander _vcl_new};

if (_loop == 2) then {_guy moveInCargo _vcl_new};

I also changed the ==2 to a 3,4,5, and 6 to see if it had any effect. 2> only one person in the cargo position spawns in the vehicle while the other stands on the outside. 2< neither of the units assigned to cargo spawn in the vehicle.

Share this post


Link to post
Share on other sites

Thanks a lot guys, it really worked :)

I had the very same problem and tried many different options. I changed the respawn.sqf and added

_guy = _unitsGroup select _loop;

_guy setSkill (_AI_skillArray select _loop);

if (_loop == 0) then {_guy moveInDriver _vcl_new};

if (_loop == 1) then {_guy moveInGunner _vcl_new};

if (_loop == 2) then {_guy moveInCommander _vcl_new};

if (_loop == 2) then {_guy moveInCargo _vcl_new};

I also changed the ==2 to a 3,4,5, and 6 to see if it had any effect. 2> only one person in the cargo position spawns in the vehicle while the other stands on the outside. 2< neither of the units assigned to cargo spawn in the vehicle.

Well... I've added a bunch of lines like the one Gunter told me to, but also adding 1 to the original loop number, I could manage to get more soldiers to spawn inside the vehicle (V3S), although only 2 don't spawn inside.

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  

×