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 11:56 am
All times are UTC + 0
scripting aircraft
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [9 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Fri May 17, 2019 12:20 am    Post subject:  scripting aircraft Reply with quote  Mark this post and the followings unread

this is kind of a dumb question, but how does one get aircraft to follow a working script, for example: attack the enemy, land, reload and wait a while, and attack again ? i cant get them to land on their pads or cooperate, and it has be baffled to the point where i have to ask for a script.

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


Joined: 28 May 2013

PostPosted: Fri May 17, 2019 3:54 am    Post subject: Reply with quote  Mark this post and the followings unread

Scripts for aircraft attack etc. are the same like for units. With the engine limitation of cloned task forces and reload logic, you can only maximize on what the engine provides. Use same task forces in different teams with preferably Max=1 and different AITriggers so that those task forces that are free/have finished their scripts can be recruited and reused. Can also explore the options of single use aircrafts like infinite ammo and no dock etc..

Back to top
View user's profile Send private message
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Fri May 17, 2019 12:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

the setup i had was 2 taskforces of 3 orcas, one is supposed to stay on a guard mission at the base, the other which is a higher priority
recruiting team is supposed to periodically attack. built by AI triggers on the (house owns) the right amount of air pads condition.
the problem im currently having is once they leave the airpad to attack an enemy which comes near, the dont land on it again, and sit  
at whatever location doing nothing good. i also cant get them to properly execute attacks and im baffled.
i have no clue how to get them to do what they are supposed to via script.

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Fri May 17, 2019 4:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Could you share script and team code?

Back to top
View user's profile Send private message
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Fri May 17, 2019 4:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

the scripts are:
guard area 450, jump to line 1 'pool'
guard area 450, attack 5(vehicles), jump to line 1 'attack'

admittedly, i have to clue whatsoever on how to make aircraft function. even if i could just get them to land on their pads again it would be tremendous.

EDIT: TI's [TDORCA] entry is as follows, if its even relevant

[TDORCA]
Name=ORCA
Prerequisite=GAHPAD
Primary=Hellfire
Elite=HellfireE
Strength=200
Category=AirPower
Armor=light
TechLevel=-1
Sight=7
RadarInvisible=no
Landable=yes
Dock=GAHPAD,NAHPAD,GLOAIR
PipScale=Ammo
Speed=20
PitchSpeed=.16
Owner=GDI
Cost=1200
Points=20
ROT=7
Ammo=5
Crewed=no
GuardRange=30
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=2
DebrisTypes=PIECE
DebrisMaximums=2
VoiceSelect=TDUSA,TDUSB,TDUSC,TDUSD
VoiceMove=TDUMA,TDUMB,TDUMC,TDUMD
VoiceAttack=TDUMA,TDUMB,TDUMC,TDUMD
VoiceFeedback=
VoiceDie=
Locomotor={4A582746-9839-11d1-B709-00A024DDAFD1}
MovementZone=Fly
ThreatPosed=20
DamageParticleSystems=SparkSys,SmallGreySSys
FlightLevel=1000
AuxSound1=ORCAUP1
AuxSound2=ORCADWN1
VeteranAbilities=SENSORS,FASTER,STRONGER
EliteAbilities=FIREPOWER,RADAR_INVISIBLE
Nominal=yes



orcas.jpg
 Description:
 Filesize:  341.68 KB
 Viewed:  2378 Time(s)

orcas.jpg



Back to top
View user's profile Send private message
OmegaBolt
President


Joined: 21 Mar 2005
Location: York, England

PostPosted: Fri May 17, 2019 6:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

In YR you don't scrip the land or reloading aspect (though aircraft are unable to land on the ground there). Have it attack a vehicle or whatever, repeat until success (which is action 49,0 IIRC) then itll do it until it runs out of ammo, where itll then go back to reload automatically and have considered its mission successful so the team will dissolve.

Its probably a good idea to look at the vanilla scripts for it though.

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


Joined: 28 May 2013

PostPosted: Sat May 18, 2019 2:09 am    Post subject: Reply with quote  Mark this post and the followings unread

With one defense and one attack team there will be confusion on which team is being created. With factory cloning in TS helipads, there will be surplus task forces created with attack team itself. So, there is no need for the defense team. The cloned task forces will be available for further recruitment.

Having 3 aircrafts also lead to one getting the opportunity to reload and the remaining ones will be on land. Having lesser aircrafts per task force will give more opportunity for reload.

For the defense script, you don't need to make guard for limited time and then use line jump. Just use new mission 11,5 or 11,10 (RA2 11,11), that will make those guard indefinitely. By default units are in guard mode, if they are not in any team.

For attack script, you don't need guard for limited time and jump line, just give 0,5 (attack vehicles). Because of the engine limitation with reload logic, it is better to create new team/AITrigger to recruit the available aircrafts which can be then sent for attack.

There is no repeat in 49,0 script action, it just sets a flag to success if executed. The Attack TargetType (0,n) script actions are self repetitive in nature, subject to availability of target, ammo etc..

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Sat May 18, 2019 9:24 am    Post subject: Reply with quote  Mark this post and the followings unread

OmegaBolt wrote:
In YR you don't scrip the land or reloading aspect (though aircraft are unable to land on the ground there).


Same here, aircraft will abort any attack mission when they run out of ammo and return to a helipad, unless scripted to move to a waypoint after the attack. For some reason when I try to make an aircraft to fly to a waypoint and delete itself after an attack, it tends to get stuck hovering over and trying to land on the waypoint indefinitely.

E1 Elite wrote:
Having lesser aircrafts per task force will give more opportunity for reload.


^This. When not recruiting from preplaced units, it's recommended to have 1 aircraft per taskforce due to the way the AI will clone the units when multiple helipads are present. I would use a higher Max value on the team so that there will be multiple instances of the team, hence multiple aircraft attacking.

_________________


Back to top
View user's profile Send private message
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Sat May 18, 2019 6:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

wow. the landing on pads after attack and guard actions being simple and automatic was NOT something i anticipated. that said, i have the aircraft working now in teams of 1.  
the multipad aircraft production bug, aircraft-landing-off-pad bug, and heavy restrictions on team production and scripts make it abundantly clear to me why RA2 went with the simpler and  
more restricted aircraft logics. however, orca bombers with very high guard range and aircraft with 1 ammo immediately come to mind.  

anyways, thanks again guys.

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