Nmenth 291 Posted May 19, 2008 I have three new units (one for Allies, Soviets, Yuri) similar in respect to the Battle Fortress as it can carry infantry for shooting out of it. I wanted to make the AI build these and load them up with infantry, but I'm not sure how to write the scrip for it. My current set up (I'll use the soviets on hard difficulty as example) has the Taskforce consisting of the Soviet Instigator (the new unit), 2 Flak Troopers, 2 Tesla Troopers, and 2 Apocalypse Tanks. The 4 troopers should get inside the Soviet Instigator, then attack the enemy with the Apocalypses. My current script is: 0 Gather at Base 1 Load onto Transport 2 Attack... (buildings) The problem is the Apocalypses try to load onto the Soviet Instigator, but since its SizeLimit=1, they just drive in circles. How can I write the script so the infantry load on and the Apocalypses just sit by waiting until they all attack? Share this post Link to post
Nmenth 291 Posted May 21, 2008 Hmm... no one has an answer yet? Well, I removed the tank escorts and just set it up for infantry only to see if it would work. It didn't exactly... I ran this method mostly against Hard France. Taskforce: 1 Einstein Annihilator, 1 SEAL, 2 Guardian GIs. AI built the taskforce and moved just outside their base as scripted, then loaded the infantry on board as scripted, but then instead of attacking, created another taskforce minus the Einstein Annihilator. This second infantry group then joined the first, but could not load up as the Einstein Annihilator has Passengers=3, so they all just sat there. I eliminated the AIs use of infantry now, and they use a tank-only taskforce. The stupid computer didn't want to make it in my trial run, but I think that's just because the AI trigger has a low weight and the computer felt like making the other taskforces I wrote for it instead. I plan to keep my taskforces as they are now, unless in future tests, the AI keeps not building it... Nevertheless, if anyone can give me an answer to my original question, I still would like to hear it. Share this post Link to post
Doctor Destiny 41 Posted May 21, 2008 Are you trying to create a general infantry transport script? If you are, you're missing a TON of steps. Share this post Link to post
Nmenth 291 Posted May 22, 2008 I don't know, maybe. What I basically want is an open-topped transport unit that will load up with certain infantry units (depends on difficulty level as to what types), then will attack along with other tanks as escort. I probably am missing steps though, it looked like I needed more to me, but I didn't know what else I did need. Up to this point, I liked to keep my scripts pretty simple so I could easily change or delete them. Share this post Link to post
Doctor Destiny 41 Posted May 22, 2008 You have to load each infantry one by one and then set it to wait until fully loaded and then attack. So it will be like this [SCRIPTNAME] 0=54,0; group at base. 1=58,[structure number]; gather at a specific structure 2=14,0; 3=14,0; 4=14,0; 5=14,0; 6=14,0; 14,0 loads infantry one by one and use as many times as you need 7=43,0; wait until fully loaded 8=53,0; gather at enemy base; set the AISafeDistance in rules to be higher to avoid getting in range of defenses 9=0,[attack whatever]; do your attacking A note on [structure number] - It is NOT based on the number defined in the rules file. That is so far off it's not even ****ing funny. Structures are 0-based and go right in order as they're listed. Do some reading and replace your list in the rules file with the one from the ModEnc page. I also recommend doing the same with the [Animations] array. Share this post Link to post
Nmenth 291 Posted May 23, 2008 Ok, I wrote out the script just like this: [ScriptAlliedEpic] 0=54,0; group at base. 1=58,3; gather at allied barracks 2=14,0; 3=14,0; 4=14,0; loads infantry one by one, three times 5=43,0; wait until fully loaded 6=53,0; gather at enemy base; set the AISafeDistance in rules to be AISafeDistance=25 7=0,1; generic attack, for testing purposes The computer sent its units just outside their base, then pulled them back in to put next to their barracks, just as the script told them to do, where they then sat, doing nothing. First off, I'd like to ask what the purpose of 0 (group at base) is when it is then followed by 1 (gather at structure), shouldn't one or the other be enough? What I suspect went wrong, is that there is also the escort, which for the allies involves IFVs. How do the infantry know which vehicle they are expected to enter? And how do I tell them that I only want the open-topped transport filled, not the IFVs? Share this post Link to post
Doctor Destiny 41 Posted May 23, 2008 A note on transports - you can only use one transport per team. The AI cannot handle multiple transports per task force. I set gather at base and gather at structure to get the units grouped together so they load up faster. Share this post Link to post
Nmenth 291 Posted May 24, 2008 I removed my other transports from the taskforces, but now the teams did the same as was my original problem... the escort tanks tried entering the units, but couldn't, so just sat there accomplishing nothing. The AI also kept making more of them despite their BuildLimit=1, but I suppose they don't care as long as it is scripted? Share this post Link to post
Doctor Destiny 41 Posted May 24, 2008 Don't include tanks or anything but the infantry and transport in your task force. Rig it up so there's a secondary team attached to the AI trigger. Share this post Link to post
Nmenth 291 Posted May 25, 2008 Doh! Forgot about secondary teams, now I feel stupid... Share this post Link to post