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 Tue Nov 24, 2026 8:33 am
All times are UTC + 0
Occupy structures
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [12 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Comr4de
Gauss Rifle Trooper


Joined: 23 Feb 2010
Location: The Netherlands

PostPosted: Mon Sep 27, 2010 2:24 pm    Post subject:  Occupy structures Reply with quote  Mark this post and the followings unread

What is the easiest way to let the AI automatically occupy a structure.
In this case it are the structures beneath:

Its a key in the defense of the enemy.
Same for conscripts in a Battle Bunker and tanks in a Tank Bunker



occupy.PNG
 Description:
 Filesize:  351.66 KB
 Viewed:  4236 Time(s)

occupy.PNG



_________________


Back to top
View user's profile Send private message
Cranium
Defense Minister


Joined: 05 Dec 2009
Location: USA

PostPosted: Mon Sep 27, 2010 5:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

just attach a script/trigger to him, telling him to enter/capture the building.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Nikademis Von Hisson
General


Joined: 05 Sep 2007
Location: Wilkes Barre PA

PostPosted: Tue Sep 28, 2010 8:00 am    Post subject: occupy Reply with quote  Mark this post and the followings unread

this what i did for my ai, the only problem the ai builds too many, but if you want them to it in SPM then you have them created....move to a waypoint then occupy the building


[0142POLK-G]
Name=Polish Occupy
0=3,POLISH11B
Group=-1

[0164POLS-G]
Name=Polish Occupy Buildings
0=64,0
1=49,0
2=6,0

[0176POLT-G]
Name=Polish Building Occupy
VeteranLevel=1
MindControlDecision=0
Loadable=no
Full=no
Annoyance=no
GuardSlower=no
House=Alliance
Recruiter=yes
Autocreate=no
Prebuild=no
Reinforce=no
Droppod=yes
UseTransportOrigin=no
Whiner=no
LooseRecruit=no
Aggressive=no
Suicide=no
Priority=5
Max=1
TechLevel=0
Group=-1
OnTransOnly=no
AvoidThreats=no
IonImmune=no
TransportsReturnOnUnload=no
AreTeamMembersRecruitable=no
IsBaseDefense=no
OnlyTargetHouseEnemy=no
Script=0141POLS-G
TaskForce=0118POLK-G

0176POLG-G=Polish Occupy,0144POLT-G,Alliance,1,4,<none>,0100000003000000000000000000000000000000000000000000000000000000,10.000000,10.000000,10.000000,1,0,1,0,<none>,1,1,1

_________________
I am authorized to send out the TMP Studio, PM ME IF YOU WANT IT And check this out, these were sent to me for help with terrain and zdata help along with TMP Studio/Builder

http://www.ppmsite.com/forum/viewtopic.php?t=27714

Back to top
View user's profile Send private message Send e-mail Skype Account
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Tue Sep 28, 2010 8:19 am    Post subject: Reply with quote  Mark this post and the followings unread

It should be noted that FA2YR does not allow you to use the additional YR script actions, a few of which I believe are related to occupying structures. Worse than that, if you manually edit the map to add the actions, FA2YR will remove them when you save the map.

Back to top
View user's profile Send private message
Nikademis Von Hisson
General


Joined: 05 Sep 2007
Location: Wilkes Barre PA

PostPosted: Tue Sep 28, 2010 9:16 am    Post subject: occupy Reply with quote  Mark this post and the followings unread

Blade wrote:
It should be noted that FA2YR does not allow you to use the additional YR script actions, a few of which I believe are related to occupying structures. Worse than that, if you manually edit the map to add the actions, FA2YR will remove them when you save the map.


Are you saying my code won't work? If that is the case, not true. The only problem is AI will build too many infantry and they will occupy any and all buildings. It becomes a mess when the main bases is destroyed. You have maybe 200 or so infantry rushing your base, that can cause a slow down in game play.

I had the code run as any script for the AI to build infantry (that can occupy a building) and when 3 were made they would move out and occupy civilian buildings.

For Single Player Maps, I had a vehicle come from off the map to a certain waypoint unload the occupants and occupy civilian buildings. And these maps were created were created for Yuri Maps. And id FA2 doesn't allow it you need to edit in notepad and nothing will be lost.

_________________
I am authorized to send out the TMP Studio, PM ME IF YOU WANT IT And check this out, these were sent to me for help with terrain and zdata help along with TMP Studio/Builder

http://www.ppmsite.com/forum/viewtopic.php?t=27714

Back to top
View user's profile Send private message Send e-mail Skype Account
Comr4de
Gauss Rifle Trooper


Joined: 23 Feb 2010
Location: The Netherlands

PostPosted: Tue Sep 28, 2010 12:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

And if I use the script action 'Attack enemy building...' and use 10 conscripts to attack it.
The building is a civilian building (occupyable), will they capture it?

_________________


Back to top
View user's profile Send private message
Nikademis Von Hisson
General


Joined: 05 Sep 2007
Location: Wilkes Barre PA

PostPosted: Tue Sep 28, 2010 1:29 pm    Post subject: occupy Reply with quote  Mark this post and the followings unread

This is from the AI editing file that is attached.


Quote:
64,0 = Garrison Structure (Yuri's Revenge only)

Any InfantryType members of this TaskForce with Occupier=yes set will enter the nearest (neutral) structure with CanOccupyFire=yes set. This action is used specifically for this purpose due to action #59 (see above) since the logic in Yuri's Revenge has changed so that the units weapon is transferred to the structure. Use of this action also allows the computer to repair those structures by sending an InfantryType with Engineer=yes set into them and also allows the AI to differentiate between attacking such a structure and entering it, which is useful if you want the AI to use infantry to destroy an occupiable structure thus preventing its enemy from using it.





I would think if you used attack enemy building it would move to the enemies base and attack.



[0164POLS-G] My Script #
Name=Polish Occupy Buildings My Script name
0=64,0 Garrison building
1=49,0 Repeat till success
2=6,0 jump to line 0

This is how I did it. I would put a building A on the map, place waypoint # close to building A. Vehicle came to Waypoint #, unload then use the 64,0 have them occupy the buildings around waypoint #


I found this file awhile ago. It is a help when you are trying to create your own AI file.

This file was removed because of a duplicate file I up loaded at this thread

http://www.ppmsite.com/forum/viewtopic.php?p=354439#354439

_________________
I am authorized to send out the TMP Studio, PM ME IF YOU WANT IT And check this out, these were sent to me for help with terrain and zdata help along with TMP Studio/Builder

http://www.ppmsite.com/forum/viewtopic.php?t=27714

Last edited by Nikademis Von Hisson on Sat May 28, 2011 10:58 am; edited 3 times in total

Back to top
View user's profile Send private message Send e-mail Skype Account
Comr4de
Gauss Rifle Trooper


Joined: 23 Feb 2010
Location: The Netherlands

PostPosted: Tue Sep 28, 2010 2:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

I took a look at the first Allied map of YR. There they attack a waypoint who is located at a structure (on top of it). The script is called 'Garrison' with some other text.
Does that work?

EDIT: DONE!
I have got an engineer who should repair the structure when it is damaged, details:

Repeat:
2 (yes)
Event:
Half Health
Action:
Create team (engineer who repairs building)

The trigger keeps firing, after the damage. I want it to reactivate when it is damaged again.

_________________


Back to top
View user's profile Send private message
Nikademis Von Hisson
General


Joined: 05 Sep 2007
Location: Wilkes Barre PA

PostPosted: Tue Sep 28, 2010 11:53 pm    Post subject: occupy Reply with quote  Mark this post and the followings unread

i havent used a script to have an engineer to repair a building, though I have tried with repairing a bridge. have to look in to this

_________________
I am authorized to send out the TMP Studio, PM ME IF YOU WANT IT And check this out, these were sent to me for help with terrain and zdata help along with TMP Studio/Builder

http://www.ppmsite.com/forum/viewtopic.php?t=27714

Back to top
View user's profile Send private message Send e-mail Skype Account
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Wed Sep 29, 2010 8:48 am    Post subject: Reply with quote  Mark this post and the followings unread

I never said the script wouldn't work, but if you do any further script editing in FA2 after manually adjusting it I believe it will remove the YR only script actions from your scripts. Its been a while since I played with them so I can't recall the exact circumstances though.

Back to top
View user's profile Send private message
Comr4de
Gauss Rifle Trooper


Joined: 23 Feb 2010
Location: The Netherlands

PostPosted: Wed Sep 29, 2010 3:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

[quote='Nikademis Von Hisson']i havent used a script to have an engineer to repair a building, though I have tried with repairing a bridge. have to look in to this[/quote]

Look at what?

@ Blade,
I never said that you said the scripts didnt work. As for occupying, the primary goal is to occupy buildings, as defense.

As for the engineer, I have seen RA2 do this at bridges with locals, though there is no event like 'Full Health' or something. The only thing is, how to apply this to a structure.

_________________


Back to top
View user's profile Send private message
Nikademis Von Hisson
General


Joined: 05 Sep 2007
Location: Wilkes Barre PA

PostPosted: Thu Sep 30, 2010 4:46 am    Post subject: occupy Reply with quote  Mark this post and the followings unread

@ Comr4de The comment Blade made was directed towards me


Quote:
occupy
i havent used a script to have an engineer to repair a building, though I have tried with repairing a bridge. have to look in to this


Some how my thought was incomplete, I think I was referring to looking into having the AI fix buildings that have come under attack which they occupy. I know that my AI sometimes fixes buildings around their base but that is because I screwed something up and haven't gone back to fix it yet.


@ Blade Oh, I took it as you were saying it wouldn't work. When you made this comment I decided to go back to a map that worked fine and I did see a problem. I think you have to edit them in one shot. If you edit one, then save then go back and edit or add another I think there is a problem. I had 15 edited ones on a map and then added more, the game kinda went screwy and modified some of the 2nd additions to the map. Since the first ones were fine and the map played out as should I didn't check to see if they worked. Though I would have found that out once I replayed the matter latter on.

_________________
I am authorized to send out the TMP Studio, PM ME IF YOU WANT IT And check this out, these were sent to me for help with terrain and zdata help along with TMP Studio/Builder

http://www.ppmsite.com/forum/viewtopic.php?t=27714

Back to top
View user's profile Send private message Send e-mail Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [12 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.2104s ][ Queries: 14 (0.0154s) ][ Debug on ]