Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 8:29 am
All times are UTC + 0
A mapping question
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Xeron
Civilian


Joined: 03 Apr 2015

PostPosted: Tue Apr 14, 2015 2:27 am    Post subject:  A mapping question Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
Agent Z
AA Infantry


Joined: 05 Sep 2013
Location: LocationNotFoundException at RealLife.Location.find() at line: -1

PostPosted: Tue Apr 14, 2015 6:11 am    Post subject: Reply with quote  Mark this post and the followings unread

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.)

Back to top
View user's profile Send private message
Xeron
Civilian


Joined: 03 Apr 2015

PostPosted: Tue Apr 14, 2015 6:16 am    Post subject: Reply with quote  Mark this post and the followings unread

That is the way I've been attempting to do it, and what they do is fire behind the building

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Apr 14, 2015 6:17 am    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Tue Apr 14, 2015 7:48 am    Post subject: Reply with quote  Mark this post and the followings unread

If you put the following in |StdMapRA2.ini|, you will have those ScriptTypes in any map you create.

Code:
[ScriptTypes]
0=01000000
1=0A0000BD
2=0A0000BE
3=0A0000BF
4=0A0000BG
5=0A0000BH
6=0A0000BI

[01000000]
Name=New script

[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 #Tongue
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").

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Apr 14, 2015 2:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
Xeron
Civilian


Joined: 03 Apr 2015

PostPosted: Tue Apr 14, 2015 11:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Wed Apr 15, 2015 12:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
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?

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.1493s ][ Queries: 11 (0.0109s) ][ Debug on ]