Posted: Tue Sep 28, 2010 8:00 am Post subject:
occupy
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
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
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. QUICK_EDIT
Posted: Tue Sep 28, 2010 9:16 am Post subject:
occupy
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
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? _________________ QUICK_EDIT
Posted: Tue Sep 28, 2010 1:29 pm Post subject:
occupy
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
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. _________________ QUICK_EDIT
Posted: Tue Sep 28, 2010 11:53 pm Post subject:
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 _________________ 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
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. QUICK_EDIT
[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. _________________ QUICK_EDIT
Posted: Thu Sep 30, 2010 4:46 am Post subject:
occupy
@ 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
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