im still tryng to add various (3 , 2 armors , 1 weapon) upgrades on a single unit , and im still stucked because im thinking that something isnt working right , i know its a bit complex , but im still asking your help
1. upgrade : a machinegun turret that works indipendently from the rest of the tank (linked to his turret bone for respecting physx) , so i've created the custom upgrade
and his proper button (tnks stygs)Code:<UpgradeTemplate id="Upgrade_M151RTech" inheritFrom="BasePurchasableUpgrade" DisplayName="UpgradeName:M151Remote" AcquireHint="UpgradePrereq:M151Remote" TypeDescription="UpgradeType:M151Remote" Description="UpgradeDesc:M151Remote" Type="PLAYER" BuildTime="90.0s" BuildCost="3500" IconImage="Button_UpgradeM151R" />
commandsCode:<PlayerUpgradeButton Id="Command_PurchaseUpgradeM151RemoteGun"> <State Image="Button_UpgradeRemoteGun" Title="NAME:PurchaseRemotegun" Description="DESCRIPTION:PurchaseRemotegun" /> </PlayerUpgradeButton>
Code:<LogicCommandSet id="GDIArmoryCommandSet"> <Cmd>Command_PurchaseUpgradeM151RemoteGun</Cmd> <Cmd>Command_PurchaseUpgradeStratofighterBooster </Cmd> <Cmd>Command_PurchaseUpgradeOrcaSensorPod</Cmd> <Cmd>Command_CommandPostCallHunterKiller</Cmd> <Cmd>Command_TogglePower</Cmd> <Cmd>Command_SelfRepair</Cmd> <Cmd>Command_Sell</Cmd> </LogicCommandSet>and his weaponCode:<LogicCommand Type="PLAYER_UPGRADE" id="Command_PurchaseUpgradeM151Wremotegun"> <Upgrade>Upgrade_M151RTech</Upgrade> </LogicCommand>
but im feeling that this is not going to work and im referring to my unit script :Code:<WeaponTemplate id="M151REMOTEMG" Name="M151HEAVYMG" AttackRange="300.0" WeaponSpeed="750.0" FireSoundPerClip="GDI_WatchTower_GunFire_v2" FireFX="FX_GDIWatchTowerFire" RadiusDamageAffects="ALLIES ENEMIES NEUTRALS" ClipSize="10" AutoReloadsClip="AUTO" AntiMask="ANTI_GROUND" DisableScatterForTargetsOnWall="true" CanFireWhileMoving="true" RotatingTurret="true" ReAcquireDetailType="PER_CLIP" > <ClipReloadTime MinSeconds="0.01s" MaxSeconds="0.01s" /> <Nuggets> <DamageNugget Damage="18.5" Radius="0.0" DelayTimeSeconds="0.0s" DamageType="GUN" DamageFXType="GDI_MACHINEGUN" DeathType="NORMAL" /> <DamageScalarDetails Scalar= "115%"> <Filter Rule="ANY" Include="VEHICLE" Exclude="HUGE_VEHICLE" /> </DamageScalarDetails> </DamageNugget> </WeaponTemplate>
Code:<?xml version="1.0" encoding="utf-8"?> <AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude"> <Tags></Tags> <Includes> <Include type="all" source="ART:guabramtank.w3x" /> <Include type="all" source="ART:GUPredTankR.w3x" /> <Include type="all" source="ART:GUPredTank_FP.w3x" /> <Include type="all" source="ART:GUPredatorTank_K.xml" /> <Include type="all" source="ART:GUPredatorTankD_K.xml" /> <Include type="all" source="ART:NUBeam.xml" /> <Include type="all" source="ART:FXWhiteSquare.xml" /> <Include type="all" source="ART:FXRailGunCoreMask.xml" /> <Include type="all" source="ART:FXRailGunCoreDistortion.xml" /> <Include type="instance" source="ART:EXTnkTrack.xml" /> <!-- Base Object --> <Include type="instance" source="DATA:BaseObjects/BaseVehicle.xml" /> </Includes> <GameObject id="GDIAbrams" inheritFrom="BaseVehicle" SelectPortrait="Portrait_GDIAbrams" ButtonImage="Portrait_GDIAbrams" Side="GDI" EditorSorting="UNIT" TransportSlotCount="1" BuildCost="3100" BuildTime="20" CommandSet="GDIAbramsCommandSet" CommandPoints="100" KindOf="PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS SCORE VEHICLE CAN_REVERSE_MOVE CAN_BE_FAVORITE_UNIT" RadarPriority="UNIT" ThreatLevel="10" ProductionQueueType="VEHICLE" UnitCategory="VEHICLE" WeaponCategory="CANNON" VoicePriority="184" EditorName="GDIAbrams" Description="Desc:GDIAbramsTank" TypeDescription="Type:GDIAbramsTank"> <ArmorSet Armor="MBT_Armor" DamageFX="VehicleDamageFX" /> <LocomotorSet Locomotor="GDIMammothLocomotor" Condition="NORMAL" Speed="54.0" /> <SkirmishAIInformation UnitBuilderStandardCombatUnit="true" /> <Draws> <TankDraw id="ModuleTag_Draw" OkToChangeModelColor="true" ExtraPublicBone="FXTracksL FXTracksR FXMUZZLEFLASH FXMGMUZZLE" TrackMarks="EXTnkTrack" TrackMarksLeftBone="FXTracksL" TrackMarksRightBone="FXTracksR" TreadAnimationRate="0.25" TreadDriveSpeedFraction="0.25" TreadPivotSpeedFraction="0.9"> <ModelConditionState ParseCondStateType="PARSE_DEFAULT" RetainSubObjects="true"> <Model Name="guabramtank" /> <WeaponFireFXBone WeaponSlotID="1" WeaponSlotType="PRIMARY_WEAPON" BoneName="FXMUZZLEFLASH" /> <WeaponRecoilBone WeaponSlotID="1" WeaponSlotType="PRIMARY_WEAPON" BoneName="FXMUZZLEFLASH" /> <WeaponMuzzleFlash WeaponSlotID="1" WeaponSlotType="PRIMARY_WEAPON" BoneName="FXMUZZLEFLASH" /> <WeaponLaunchBone WeaponSlotID="1" WeaponSlotType="PRIMARY_WEAPON" BoneName="FXMUZZLEFLASH" /> <WeaponFireFXBone WeaponSlotID="1" WeaponSlotType="SECONDARY_WEAPON" BoneName="FXMGMUZZLE" /> <WeaponRecoilBone WeaponSlotID="1" WeaponSlotType="SECONDARY_WEAPON" BoneName="FXMGMUZZLE" /> <WeaponMuzzleFlash WeaponSlotID="1" WeaponSlotType="SECONDARY_WEAPON" BoneName="FXMGMUZZLE" /> <WeaponLaunchBone WeaponSlotID="1" WeaponSlotType="SECONDARY_WEAPON" BoneName="FXMGMUZZLE" /> <Turret TurretNameKey="Bone_Turret" TurretPitch="Bone_barrel" TurretID="1" /> <WeaponFireFXBone WeaponSlotID="1" WeaponSlotType="TERTIARY_WEAPON" BoneName="FXRemoteMuzzle" /> <WeaponRecoilBone WeaponSlotID="1" WeaponSlotType="TERTIARY_WEAPON" BoneName="FXRemoteMuzzle" /> <WeaponMuzzleFlash WeaponSlotID="1" WeaponSlotType="TERTIARY_WEAPON" BoneName="FXRemoteMuzzle" /> <WeaponLaunchBone WeaponSlotID="1" WeaponSlotType="TERTIARY_WEAPON" BoneName="FXRemoteMuzzle" /> <Turret TurretNameKey="Bone_base" TurretPitch="Bone_gun" TurretID="2" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="DYING USER_5"> <Model Name="GUPredTankR" /> <Texture Original="GUPredatorTankD" New="GUPredatorTankD_K" /> <ParticleSysBone BoneName="ROOTTRANSFORM" FXParticleSystemTemplate="GDIDebrisSmallFire" FollowBone="true" /> <ParticleSysBone BoneName="ROOTTRANSFORM" FXParticleSystemTemplate="GDIDebrisSmallFireDistortion" FollowBone="true" /> <ParticleSysBone BoneName="ROOTTRANSFORM" FXParticleSystemTemplate="GDIDebrisSmallSmoke" FollowBone="true" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" RetainSubObjects="true" ConditionsYes="REALLYDAMAGED USER_5"> <Model Name="guabramtank" /> <Texture Original="GUPredatorTank" New="GUPredatorTankD_K" /> <ParticleSysBone BoneName="bone_barrel" FXParticleSystemTemplate="GDIPredDamagedFire" FollowBone="true" /> <ParticleSysBone BoneName="bone_barrel" FXParticleSystemTemplate="GDIPredDamagedFireDistortion" FollowBone="true" /> <ParticleSysBone BoneName="bone_barrel" FXParticleSystemTemplate="GDIPredDamagedSmoke" FollowBone="true" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="DYING"> <Model Name="GUPredTankR" /> <ParticleSysBone BoneName="ROOTTRANSFORM" FXParticleSystemTemplate="GDIDebrisSmallFire" FollowBone="true" /> <ParticleSysBone BoneName="ROOTTRANSFORM" FXParticleSystemTemplate="GDIDebrisSmallFireDistortion" FollowBone="true" /> <ParticleSysBone BoneName="ROOTTRANSFORM" FXParticleSystemTemplate="GDIDebrisSmallSmoke" FollowBone="true" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" RetainSubObjects="true" ConditionsYes="REALLYDAMAGED"> <Model Name="guabramtank" /> <Texture Original="GUPredatorTank" New="GUPredatorTankD" /> <ParticleSysBone BoneName="bone_barrel" FXParticleSystemTemplate="GDIPredDamagedFire" FollowBone="true" /> <ParticleSysBone BoneName="bone_barrel" FXParticleSystemTemplate="GDIPredDamagedFireDistortion" FollowBone="true" /> <ParticleSysBone BoneName="bone_barrel" FXParticleSystemTemplate="GDIPredDamagedSmoke" FollowBone="true" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="FORMATION_PREVIEW"> <Model Name="GUPredTank_FP" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" RetainSubObjects="true" ConditionsYes="USER_5"> <Model Name="guabramtank" /> <Texture Original="GUPredatorTank" New="GUPredatorTank_K" /> </ModelConditionState> <AnimationState ParseCondStateType="PARSE_DEFAULT"> <!-- Circumvents blend issues when the arrow is being shown... --> <Script> CurDrawableShowSubObject("TreadsStop") CurDrawableHideSubObject("TreadsBack") CurDrawableHideSubObject("TreadsMove") CurDrawableHideSubObject("TreadsLeft") CurDrawableHideSubObject("TreadsRight") </Script> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="MOVING TURN_LEFT"> <!-- Circumvents blend issues when the arrow is being shown... --> <Script> CurDrawableHideSubObject("TreadsStop") CurDrawableHideSubObject("TreadsBack") CurDrawableHideSubObject("TreadsMove") CurDrawableShowSubObject("TreadsLeft") CurDrawableHideSubObject("TreadsRight") </Script> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="MOVING TURN_RIGHT"> <!-- Circumvents blend issues when the arrow is being shown... --> <Script> CurDrawableHideSubObject("TreadsStop") CurDrawableHideSubObject("TreadsBack") CurDrawableHideSubObject("TreadsMove") CurDrawableHideSubObject("TreadsLeft") CurDrawableShowSubObject("TreadsRight") </Script> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="MOVING"> <Script> CurDrawableHideSubObject("TreadsStop") CurDrawableHideSubObject("TreadsBack") CurDrawableShowSubObject("TreadsMove") CurDrawableHideSubObject("TreadsLeft") CurDrawableHideSubObject("TreadsRight") </Script> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="FIRING_OR_RELOADING_A MOVING BACKING_UP"> <Script> CurDrawableHideSubObject("TREADSSTOP") CurDrawableShowSubObject("TREADSBACK") CurDrawableHideSubObject("TREADSLEFT") CurDrawableHideSubObject("TREADSRIGHT") CurDrawableHideSubObject("TREADSMOVE") </Script> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="MOVING BACKING_UP"> <Script> CurDrawableHideSubObject("TREADSSTOP") CurDrawableShowSubObject("TREADSBACK") CurDrawableHideSubObject("TREADSLEFT") CurDrawableHideSubObject("TREADSRIGHT") CurDrawableHideSubObject("TREADSMOVE") </Script> </AnimationState> <LeftTread>"TreadsL"</LeftTread> <RightTread>"TreadsR"</RightTread> </TankDraw> <ScriptedModelDraw id="ModuleTag_FX"> <ModelConditionState ParseCondStateType="PARSE_DEFAULT"> <Model Name="" /> </ModelConditionState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="MOVING"> <ParticleSysBone BoneName="NONE" FXParticleSystemTemplate="TreadDust" FollowBone="true" /> <ParticleSysBone BoneName="NONE" FXParticleSystemTemplate="TreadDirt" FollowBone="true" /> </AnimationState> </ScriptedModelDraw> </Draws> <Behaviors> <ProductionUpdate id="ProductionUpdateModuleTag" GiveNoXP="true" /> <WeaponSetUpdate id="ModuleTag_WeaponSetUpdate"> <WeaponSlotTurret ID="1" AllowInterleavedFiring="true" InterleavedStyle="INTERLEAVE_FIRST_AVAILABLE" WeaponChoiceCriteria="PREFER_MOST_DAMAGE"> <Weapon Ordering="PRIMARY_WEAPON" Template="120CannonSabot" ObjectStatus="WEAPON_UPGRADED_01" /> <Weapon Ordering="PRIMARY_WEAPON" Template="120CannonHeat" ObjectStatus="WEAPON_UPGRADED_02"/> <Weapon Ordering="SECONDARY_WEAPON" Template="CoaxialMG" /> <TurretSettings TurretTurnRate="120" TurretPitchRate="30" AllowsPitch="true" MinIdleScanTime="1.0s" MaxIdleScanTime="5.0s" MinIdleScanAngle="0.0" MaxIdleScanAngle="90.0"> <TurretAITargetChooserData CanAcquireDynamicIfAssignedOutOfRange="true" /> </TurretSettings> </WeaponSlotTurret> <WeaponSlotTurret ID="2" AllowInterleavedFiring="true" InterleavedStyle="INTERLEAVE_FIRST_AVAILABLE" WeaponChoiceCriteria="PREFER_MOST_DAMAGE"> <Weapon Ordering="TERTIARY_WEAPON" Template="M151REMOTEMG" ObjectStatus="RIDER1" /> <TurretSettings TurretTurnRate="200" TurretPitchRate="30" AllowsPitch="true" MinIdleScanTime="1.0s" MaxIdleScanTime="3.0s" MinIdleScanAngle="0.0" MaxIdleScanAngle="90.0"> <TurretAITargetChooserData CanAcquireDynamicIfAssignedOutOfRange="true" /> </TurretSettings> </WeaponSlotTurret> </WeaponSetUpdate> <LaserState id="ModuleTag_LaserState" LaserId="0"></LaserState> <Physics id="ModuleTag_Physics" /> <SlowDeath id="ModuleTag_Death" SinkDelay="3s" SinkRate="1.0" DestructionDelay="7s"> <OCL Type="INITIAL"> <OCL>OCL_GDIPredatorTankDebris</OCL> </OCL> <DieMuxData DeathTypes="ALL" DeathTypesForbidden="TOPPLED" /> <Sound Type="INITIAL" List="GDI_Generic_VoiceDieMS" /> </SlowDeath> <FXListBehavior id="ModuleTag_FXList"> <DieMuxData DeathTypes="ALL" /> <Event Index="onDeath" FX="FX_GDIMammothExplode" /> </FXListBehavior> <SubObjectsUpgrade id="ModuleTag_Showm151" ShowSubObjects="M151R"> <TriggeredBy>Upgrade_M151RTech</TriggeredBy> </SubObjectsUpgrade> <RemoveUpgradeUpgrade id="ModuleTag_CommandSet_RemoveFor_01"> <TriggeredBy>Upgrade_SelectAmmo_01</TriggeredBy> <UpgradeToRemove>Upgrade_SelectAmmo_02</UpgradeToRemove> </RemoveUpgradeUpgrade> <RemoveUpgradeUpgrade id="ModuleTag_CommandSet_RemoveFor_02"> <TriggeredBy>Upgrade_SelectAmmo_02</TriggeredBy> <UpgradeToRemove>Upgrade_SelectAmmo_01</UpgradeToRemove> </RemoveUpgradeUpgrade> <StatusBitsUpgrade id="ModuleTag_StatusBitUpgradeFor01" StatusToSet="WEAPON_UPGRADED_01" StatusToClear="WEAPON_UPGRADED_02 WEAPON_UPGRADED_03"> <TriggeredBy>Upgrade_SelectAmmo_01</TriggeredBy> </StatusBitsUpgrade> <StatusBitsUpgrade id="ModuleTag_StatusBitUpgradeFor02" StatusToSet="WEAPON_UPGRADED_02" StatusToClear="WEAPON_UPGRADED_01 WEAPON_UPGRADED_03"> <TriggeredBy>Upgrade_SelectAmmo_02</TriggeredBy> </StatusBitsUpgrade> <StatusBitsUpgrade id="ModuleTag_UpgradeWeapon" StatusToSet="RIDER1"> <TriggeredBy>Upgrade_M151RTech</TriggeredBy> </StatusBitsUpgrade> <StatusBitsUpgrade id="ModuleTag_VeterancyUpgrade" StatusToSet="WEAPON_UPGRADED_03"> <TriggeredBy>Upgrade_Veterancy_HEROIC</TriggeredBy> </StatusBitsUpgrade> <ModelConditionUpgrade id="ModuleTag_AllFactionUpgrade" AddConditionFlags="USER_5"> <TriggeredBy>Upgrade_AllFactionUpgrade</TriggeredBy> </ModelConditionUpgrade> </Behaviors> <AI> <AIUpdate id="ModuleTag_AI" AutoAcquireEnemiesWhenIdle="YES" AILuaEventsList="GDIPredatorFunctions"> <UnitAITargetChooserData CanPickDynamicTargets="false" SympathyRange="100.0" /> </AIUpdate> </AI> <Body> <ActiveBody id="ModuleTag_Body" MaxHealth="3400" /> </Body> <Geometry IsSmall="false"> <Shape Type="BOX" MajorRadius="18.0" MinorRadius="12.0" Height="10.0" ContactPointGeneration="VEHICLE" /> </Geometry> <AudioArrayVoice> <AudioEntry Sound="GDI_PredatorTank_VoiceAttack" AudioType="voiceAttack" /> <AudioEntry Sound="GDI_PredatorTank_VoiceCreate" AudioType="voiceCreated" /> <AudioEntry Sound="GDI_PredatorTank_VoiceCreate" AudioType="voiceFullyCreated" /> <AudioEntry Sound="GDI_PredatorTank_VoiceMove" AudioType="voiceGuard" /> <AudioEntry Sound="GDI_PredatorTank_VoiceMoveAttack" AudioType="voiceAttackAfterMoving" /> <AudioEntry Sound="GDI_PredatorTank_VoiceMove" AudioType="voiceMove" /> <AudioEntry Sound="GDI_PredatorTank_VoiceRetreat" AudioType="voiceRetreatToCastle" /> <AudioEntry Sound="GDI_PredatorTank_VoiceSelectMS" AudioType="voiceSelect" /> <AudioEntry Sound="GDI_PredatorTank_VoiceSelectBattleMS" AudioType="voiceSelectBattle" /> </AudioArrayVoice> <AudioArraySound> <AudioEntry Sound="PredatorIdleLoop" AudioType="soundAmbient" /> <AudioEntry Sound="PredatorMoveStart" AudioType="soundMoveStart" /> </AudioArraySound> <ShadowInfo Type="VOLUME" /> <VisionInfo VisionRange="350" ShroudClearingRange="400" /> </GameObject> </AssetDeclaration>
i know it a very long thread , but im begging you to read it to the deep and ****yze my code to report any possible error , focus on the weapons and tell me if my choice of making a new turret its correct or not , tomorrow morning ill' write down the armor question .
tnks for any help

Reply With Quote