Jump to content


Photo

Occupy: Guardian GI and Flak Trooper


  • Please log in to reply
2 replies to this topic

#1 VTrial

VTrial
  • New Members
  • 1 posts

Posted 22 May 2018 - 02:14 PM

Hello there, I modify game for my own and I added params to Guardian GI and Flak Trooper: occupy: yes to unit and OccupantAnim=UCCONS to weapon string in rulesmd.

It's good, but Guardians GI (in occupy structure) don't automatically attacks air units (with ctrl button they're do), only ground with Missile Launcher.

 

[GGI]
UIName=Name:GuardianGI
Name=Guardian GI
Category=Soldier
Primary=M60
Secondary=MissileLauncher ;GEF New Guardian GI weapon
OpenTransportWeapon=1;defaults to -1 (decide normally)  What weapon should I use in a Battle Fortress
Occupier=yes ; I can Occupy UC buildings
OccupyWeapon=MissileLauncher; The weapon I use while Occupying.  Defaults to 0 (Primary)
EliteOccupyWeapon=MissileLauncherE; The weapon I use while Occupying.  Defaults to 0 (Primary)
Prerequisite=GAPILE
CrushSound=InfantrySquish
Strength=100
Pip=white
Armor=none
TechLevel=2
Sight=6
Speed=3
Owner=British,French,Germans,Americans,Alliance
AllowedToStartInMultiplayer=no
Cost=400
Soylent=150
Points=10
IsSelectableCombatant=yes
VoiceSelect=GuardianGISelect
VoiceMove=GuardianGIMove
VoiceAttack=GuardianGIAttackCommand
VoiceFeedback=GuardianGIFear
VoiceSpecialAttack=GuardianGIMove
DieSound=GuardianGIDie
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
ThreatPosed=10 ; This value MUST be 0 for all building addons
ImmuneToVeins=yes
ImmuneToPsionics=no
Bombable=yes
Deployer=yes
DeployFire=yes
; DeployTime=.022  ; PCG; Unused for now.  Was maybe going to make its way in if we did
; a more explicit state machine for deploying b/c of autodeploy.
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Size=1
Crushable=yes
DeployedCrushable=no
DeploySound=GuardianGIDeploy
UndeploySound=GIUndeploy
ElitePrimary=M60E
EliteSecondary=MissileLauncherE ;GEF New Guardian GI weapon
;EliteSecondary=ParaE
IFVMode=16
PixelSelectionBracketDelta=-6;gs higher number draws lower.  Pixel difference from normal for selection bracket

---------------------------------------------------------------------------------------------------------------------------------------------------

How to make them attack automatically on air units when they are in the building/structure?

 

 

Flak Troopers (in soviet bunker) attacks only JUMPJET (Rocketeer).

 

[FLAKT]
UIName=Name:FLAKT
Name=Flak Trooper
;Image=CONS
Category=Soldier
Primary=FlakGuyGun
Secondary=FlakGuyAAGun
Prerequisite=NAHAND,NARADR
CrushSound=InfantrySquish
Strength=100
Armor=none
TechLevel=1
Pip=white
Sight=5
Speed=4
Owner=Russians,Confederation,Africans,Arabs,YuriCountry
Cost=300
Soylent=150
Points=5
IsSelectableCombatant=yes
VoiceSelect=FlakTroopSelect
VoiceMove=FlakTroopMove
VoiceAttack=FlakTroopAttackCommand
VoiceFeedback=FlakTroopFear
VoiceSpecialAttack=FlakTroopMove
DieSound=FlakTroopDie
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
;MovementZone=InfantryDestroyer ;GEF wow!!! copy paste bug from the original Disk Thrower!
ThreatPosed=5    ; This value MUST be 0 for all building addons
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
ImmuneToVeins=yes
Size=1
AllowedToStartInMultiplayer=no
ElitePrimary=FlakGuyGunE
EliteSecondary=FlakGuyAAGunE
IFVMode=3
Occupier=yes ; I can Occupy UC buildings
OccupyWeapon=FlakGuyAAGun; The weapon I use while Occupying.  Defaults to 0 (Primary)
EliteOccupyWeapon=FlakGuyAAGunE; The weapon I use while Occupying.  Defaults to 0 (Primary)

------------------------------------------------------------------------------------------------------------------------------------------------

How to make them attack ALL air units when they are in the building/structure?



#2 Junior8805

Junior8805
  • New Members
  • 3 posts

Posted 27 June 2018 - 02:01 PM

Hey Mate,
 
I have done the exact same thing in my mod.
 
First, I noticed you might want to add this line:
 
OccupyPip=Persongreen ; or Personwhite, Personblue, Personred
 
I set this so you can see the different units in teh building by mousing over it.
 
Maybe a better way of doing this would be to create a new weapon when they occupy, this way you can change it without changing his NORMAL deployed weapon. Follow the same naming convention for easy use.
 
For Example:[UCMissileLauncher] and [UCMissileLauncherE].

 

Make sure the PROJECTILE of the weapon has "AG=yes" and "AA=yes".


Edited by Junior8805, 27 June 2018 - 02:04 PM.


#3 Junior8805

Junior8805
  • New Members
  • 3 posts

Posted 27 June 2018 - 02:09 PM

As For the Flak Trooper,

 

he actually has 2 different weapons, one for land, and one for air.

 

This is because the land has a VISIBLE projectile, and the air does not. with the way they made its weapons, there is no way to make it work for both land and air.

 

Instead, you need to make a NEW weapon, as i did.

 

Here is the code for the flak trooper:

 

OccupyWeapon=UCFlakGuyGun
EliteOccupyWeapon=UCFlakGuyGunE
OccupyPip=Personwhite
Occupier=yes
 
Code for weapon:
 
[UCFlakGuyGun]
Damage=17
ROF=20
Range=5
Projectile=UCFlakProj
Speed=50
Report=FlakTrackAttackGround
Warhead=FlakTWH
Anim=GUNFIRE
 
Code for the Projectile:
 
[UCFlakProj]
Image=120MM
Arcing=true
Inviso=yes
AA=yes
AG=yes
Shadow=no
Inaccurate=yes
FlakScatter=yes
SubjectToCliffs=no
SubjectToElevation=yes
SubjectToWalls=yes
 
This will make it work a treat, the only downside is when he is in the building he will shoot tanks and men with no visible projectile, but it still works for both air and land. Being as you can only have one occupy weapon!
 
Enjoy!
 
Junior





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users