Posted: Tue Apr 14, 2015 2:27 am Post subject:
A mapping question
Greetings, I am relatively unknown upon these forums. I am currently making a single player map, but I cannot seem to find a way to make the AI garrison buildings with it's troops. Can anybody please explain how I could go about doing it ? Thank you for your time. QUICK_EDIT
Joined: 05 Sep 2013 Location: LocationNotFoundException at RealLife.Location.find() at line: -1
Posted: Tue Apr 14, 2015 6:11 am Post subject:
The way I used to do it;
Make a team consisting of the infantry supposed to garrison the building, and give them a script that tells them to move to a waypoint, which is placed on the target building(on one of the cells it is placed on).
I am not sure(don't remember) whether I told them to attack the waypoint or to move to the waypoint, and I don't have that computer near me right now to check it.
(They do it some other way in the campaign, don't really know how.) QUICK_EDIT
[0A0000BD]
0=5,0
1=60,0
Name=DO NOT OPEN - Enter nearest Grinder SCR
[0A0000BE]
0=5,0
1=61,0
Name=DO NOT OPEN - Occupy nearest Tank Bunker SCR
[0A0000BF]
0=5,0
1=62,0
Name=DO NOT OPEN - Enter nearest Bio Reactor SCR
[0A0000BG]
0=5,0
1=63,0
Name=DO NOT OPEN - Occupy nearest Battle Bunker SCR
[0A0000BH]
0=5,0
1=64,0
Name=DO NOT OPEN - Garrison nearest Structure SCR
[0A0000BI]
0=5,0
1=0,11
Name=DO NOT OPEN - Attack nearest Tech Building SCR
EDIT: LOL! That's my topic
It should be noted that what Blade says in that topic, isn't true. FA2 saves them, but assumes 0 for script actions it doesn't know when you open them (hence why I named it "DO NOT OPEN"). _________________
There is a garrison action in the AI scripts, mine just moves in a direction randomly or moves outside of the base, then tries to garrison the nearest buildings...
Now once in a while the function doesn't work entirely as intended and they do try to destroy it. Just like if you've noticed your troops will often try to destroy a damaged building after they were ejected.
There was probably some obvious logic attached to it, but it could be remnant code taking over under rare conditions, because it's usually only 1-2 infantry involved not all of them. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
I've managed to do it, now I'm attempting to figure out how to make the AI create teams of conscripts and send them inside said buildings. Thank you for the help, guys. QUICK_EDIT
There is a garrison action in the AI scripts, mine just moves in a direction randomly or moves outside of the base, then tries to garrison the nearest buildings...
Now once in a while the function doesn't work entirely as intended and they do try to destroy it. Just like if you've noticed your troops will often try to destroy a damaged building after they were ejected.
There was probably some obvious logic attached to it, but it could be remnant code taking over under rare conditions, because it's usually only 1-2 infantry involved not all of them.
Could you specify the action index and its parameter? _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum