Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline king  
#1 Posted : Saturday, November 10, 2018 5:09:17 AM(UTC)
king
Major
Joined: 8/17/2008(UTC)
Posts: 159
Location: DK

Was thanked: 1 time(s) in 1 post(s)
I have this tank the MAMMOTH, all of my other units have an upgrade called nanoarmor, self repairing. But this tank doesnt use the upgrade though all other does. Could someone check my code?


;------------------------------------------------------------------------------
Object USAMammothTank

; *** ART Parameters ***
SelectPortrait = SAMammoth_L
ButtonImage = SAMammoth

UpgradeCameo1 = Upgrade_AmericaScoutDrone
UpgradeCameo2 = Upgrade_AmericaNanoArmor
UpgradeCameo3 = Upgrade_AmericaEnergyShieldGenerator
UpgradeCameo4 = Upgrade_AmericaTankRocketPods

Draw = W3DOverlordTankDraw ModuleTag_01
ConditionState = NONE
Model = AVMammoth
Turret = Turret
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponLaunchBone = PRIMARY Muzzle
End
ConditionState = REALLYDAMAGED
Model = AVMammoth_d
Turret = Turret
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponLaunchBone = PRIMARY Muzzle
End

ConditionState = RUBBLE
Model = AVMammoth_d
Turret = Turret
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponLaunchBone = PRIMARY Muzzle
End

TrackMarks = EXTnkTrack.tga
OkToChangeModelColor = Yes
TreadAnimationRate = 2.0; amount of tread texture to move per second
TreadDriveSpeedFraction = 0.3 ; fraction of locomotor speed below which treads stop moving.
TreadPivotSpeedFraction = 0.6 ; fraction of locomotor speed below which we allow pivoting.
End

Draw = W3DModelDraw ModuleTag_Shield01

OkToChangeModelColor = Yes

DefaultConditionState
Model = AVMammot_dum
End
AliasConditionState = REALLYDAMAGED
AliasConditionState = RUBBLE

ConditionState = USER_1
Model = AVMammoth_S
Turret = Turret
End

ConditionState = USER_1 REALLYDAMAGED
Model = AVMammoth_SD
Turret = Turret
End
AliasConditionState = USER_1 RUBBLE

End

Draw = W3DModelDraw ModuleTag_Rockets01

OkToChangeModelColor = Yes
ProjectileBoneFeedbackEnabledSlots = SECONDARY

DefaultConditionState
Model = AVMammot_dum
End
AliasConditionState = REALLYDAMAGED
AliasConditionState = RUBBLE

ConditionState = WEAPONSET_PLAYER_UPGRADE
Model = AVMammothR
Turret = Turret
WeaponFireFXBone = SECONDARY WeaponA
WeaponLaunchBone = SECONDARY WeaponA
End

ConditionState = WEAPONSET_PLAYER_UPGRADE REALLYDAMAGED
Model = AVMammothR_D
Turret = Turret
WeaponFireFXBone = SECONDARY WeaponA
WeaponLaunchBone = SECONDARY WeaponA
End
AliasConditionState = WEAPONSET_PLAYER_UPGRADE RUBBLE
End

; ***DESIGN parameters ***
DisplayName = OBJECT:USMammothTank
Side = AmericaSupremeGeneral
EditorSorting = VEHICLE
TransportSlotCount = 4 ;how many "slots" we take in a transport (0 == not transportable)

WeaponSet
Conditions = None
Weapon = PRIMARY CWCusM68_125mm_Cannon
End

WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY CWCusM68_125mm_Cannon
Weapon = SECONDARY MammothTankTuskMissiles
End

ArmorSet
Conditions = None
Armor = MammothTankArmor
DamageFX = TankDamageFX
End

ArmorSet
Conditions = PLAYER_UPGRADE
Armor = MammothTankArmor
DamageFX = EnergyShieldDamageFX
End

BuildCost = 5000
BuildTime = 2.0 ;in seconds
VisionRange = 650
ShroudClearingRange = 750

Prerequisites
Object = USAStrategyCenter
Science = SCIENCE_SUPR
Science = SCIENCE_Rank8
End

ExperienceValue = 200 200 400 600 ;Experience point value at each level
ExperienceRequired = 0 400 600 1200 ;Experience points needed to gain each level
IsTrainable = Yes ;Can gain experience
CrusherLevel = 2 ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
CrushableLevel = 3 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = USAMammothTankCommandSet

; *** AUDIO Parameters ***
VoiceSelect = MammothTankVoiceSelect
SoundMoveStart = MammothTankMoveStart
SoundMoveStartDamaged = MammothTankMoveStart
VoiceMove = MammothTankVoiceMove
VoiceGuard = MammothTankVoiceMove
VoiceAttack = MammothTankVoiceAttack

UnitSpecificSounds
; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
VoiceCreate = MammothTankVoiceCreate
TurretMoveLoop = OverlordTankTurretMoveLoop
VoiceCrush = MammothTankVoiceMove
VoiceEnter = MammothTankVoiceMove
End

; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE HUGE_VEHICLE

Body = ActiveBody ModuleTag_02
MaxHealth = 2100.0
InitialHealth = 2100.0

; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
SubdualDamageCap = 2200
SubdualDamageHealRate = 500
SubdualDamageHealAmount = 50
End

Behavior = AIUpdateInterface ModuleTag_03
Turret
TurretTurnRate = 120
ControlledWeaponSlots = PRIMARY SECONDARY
End
AutoAcquireEnemiesWhenIdle = Yes
End

Locomotor = SET_NORMAL MammothLocomotor

Behavior = PhysicsBehavior ModuleTag_14
Mass = 50.0
End

Behavior = DestroyDie ModuleTag_711
DeathTypes = NONE +CRUSHED +SPLATTED
End

; Just explode death
Behavior = SlowDeathBehavior ModuleTag_16
DeathTypes = ALL -CRUSHED -SPLATTED
ProbabilityModifier = 50
DestructionDelay = 500
DestructionDelayVariance = 100
FX = INITIAL FX_GenericTankDeathEffect
OCL = MIDPOINT OCL_MammothTankDeathEffect
FX = FINAL FX_GenericTankDeathExplosion
End

Behavior = ObjectCreationUpgrade ModuleTag_06
UpgradeObject = OCL_AmericanScoutDrone
TriggeredBy = Upgrade_AmericaScoutDrone
End

Behavior = ProductionUpdate ModuleTag_Production01
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End

Behavior = CreateCrateDie ModuleTag_17
CrateData = SalvageCrateData
End

Behavior = TransitionDamageFX ModuleTag_18
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_OverlordDamageTransition
End

Behavior = FlammableUpdate ModuleTag_21
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 3 ; taking this much damage...
AflameDamageDelay = 500 ; this often.
End

Behavior = EjectPilotDie ModuleTag_127
GroundCreationList = OCL_EjectPilotOnGround
AirCreationList = OCL_EjectPilotViaParachute
ExemptStatus = HIJACKED
VeterancyLevels = ALL -REGULAR ;only vet+ gives pilot
End

;Behavior = OverlordContain ModuleTag_ArmorAddon01
;Slots = 1
;DamagePercentToUnits = 100%
;AllowInsideKindOf = PORTABLE_STRUCTURE
;PassengersAllowedToFire = Yes
;End

;Behavior = ObjectCreationUpgrade ModuleTag_ArmorAddon02
;UpgradeObject = OCL_AmericaEnergyShieldUpgrade_Mammoth
;TriggeredBy = Upgrade_AmericaEnergyShieldGenerator
;End

;Behavior = ArmorUpgrade ModuleTag_ArmorAddon03
;TriggeredBy = Upgrade_AmericaEnergyShieldGenerator
;End

;Behavior = ModelConditionUpgrade ModuleTag_ArmorAddon04
;ConditionFlag = USER_1
;TriggeredBy = Upgrade_AmericaEnergyShieldGenerator
;End

Behavior = WeaponSetUpgrade ModuleTag_Tusks01
TriggeredBy = Upgrade_AmericaTankRocketPods
End

Behavior = AutoHealBehavior ModuleTag_05
HealingAmount = 25
HealingDelay = 1000 ; msec
StartsActive = No
TriggeredBy = Upgrade_AmericaNanoArmor
End

Behavior = VeterancyGainCreate ModuleTag_23
StartingLevel = ELITE
End

Scale = 1.0
Geometry = BOX
GeometryMajorRadius = 30.0 ;26.0
GeometryMinorRadius = 18.0
GeometryHeight = 12.0
GeometryIsSmall = No
Shadow = SHADOW_VOLUME
ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length
End
Sponsor
Offline Zatsupachi  
#2 Posted : Saturday, November 10, 2018 10:02:04 AM(UTC)
Zatsupachi
Major
Joined: 3/27/2015(UTC)
Posts: 490

Thanks: 5 times
Was thanked: 213 time(s) in 155 post(s)
add this to AutoHealBehavior, i guess:

Code:
RequiresAllTriggers   = Yes
"It's precision_bomber."

Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mod...oads/death-label-ver-099

Next Episode:
precision_bomber's Zero Hour SCIENCE!
Offline king  
#3 Posted : Wednesday, November 21, 2018 7:56:22 AM(UTC)
king
Major
Joined: 8/17/2008(UTC)
Posts: 159
Location: DK

Was thanked: 1 time(s) in 1 post(s)
Thx. for the answer but no-go. It works on many other units but this unit cant use it somehow? I tried to rearrange the upgrade in the file but no luck.

Thx.
Offline Annihilationzh  
#4 Posted : Thursday, November 22, 2018 8:07:41 AM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
Puzzling. It's not healing at all?

It should be healing from the elite veterancy as well as the autoheal. That makes me wonder if they're clashing or something. But honestly, I have no clue why it's not working.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Offline UTD^Force  
#5 Posted : Thursday, November 22, 2018 2:56:42 PM(UTC)
UTD^Force
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 8/13/2013(UTC)
Posts: 817
Jordan
Location: Middle east

Thanks: 430 times
Was thanked: 184 time(s) in 168 post(s)
I've also tried your code again and again removing stuff and reorganizing them, but I couldn't get it to not heal. It always auto repaired.
Proud Muslim

UTD^Force

Moderator and former map reviewer
CnC Labs
Offline Annihilationzh  
#6 Posted : Thursday, November 22, 2018 5:17:42 PM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
Originally Posted by: UTD^Force Go to Quoted Post
I've also tried your code again and again removing stuff and reorganizing them, but I couldn't get it to not heal. It always auto repaired.

Wait, did I misread it? I thought OP meant that it wasn't healing at all. So it's healing all the time when it's not supposed to be?

Well isn't that the result of the elite veterancy? All elite and heroic units auto-heal. What happens if you remove ModuleTag_23? I can't test it myself. I don't have the game installed.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Offline UTD^Force  
#7 Posted : Friday, November 23, 2018 6:00:43 AM(UTC)
UTD^Force
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 8/13/2013(UTC)
Posts: 817
Jordan
Location: Middle east

Thanks: 430 times
Was thanked: 184 time(s) in 168 post(s)
Oh no, you misunderstood me. I meant that I have tried too many things to get it to not work to see what is the problem.
He wants it to heal, but it doesn't. When I tried his code, it worked. I tried removing and reorganizing upgrades and behaviours to be almost the same code as his tank's, but it still healed.

EDIT: I also removed the VeterancyGainCreate behavior and it still healed because of the upgrade.
I was trying to find the solution by causing a problem in the code, always works, but not this time.

Edited by user Friday, November 23, 2018 6:06:17 AM(UTC)  | Reason: Not specified

Proud Muslim

UTD^Force

Moderator and former map reviewer
CnC Labs
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.