Ankündigung

Einklappen
Keine Ankündigung bisher.

Problem beim Ini coding StealthGenerator

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Problem beim Ini coding StealthGenerator

    Hi, ich arbeite gerade an einem Mod und will für eine Einheit eine Stealthfunktion einbauen die man per Button an und ausschalten kann. Ich schaffe es aber leider nicht. Hab mir das Tarnfeldtutorial von Detonato als Vorlage genommen. Das sieht dann so aus:

    Einheiten InI:

    ;----------------------------------------------------------------------------------
    Object Fafnir

    ; *** ART Parameters ***
    SelectPortrait = SAFafnir_L
    ButtonImage = SAFafnir

    Draw = W3DTankDraw ModuleTag_01
    OkToChangeModelColor = Yes
    ExtraPublicBone = TURRETEL

    DefaultConditionState
    Model = Fafnir
    Turret = TURRET
    TurretPitch = TURRETEL
    Animation = Fafnir_SKL.Fafnir_STA
    AnimationMode = LOOP

    WeaponFireFXBone = PRIMARY WEAPONC
    WeaponMuzzleFlash = PRIMARY MUZZLEFX

    WeaponFireFXBone = SECONDARY WEAPONA
    WeaponLaunchBone = SECONDARY WEAPONA

    TransitionKey = TRANS_Stand
    HideSubObject = MUZZLEFX01 MUZZLEFX02
    End

    ConditionState = MOVING
    Animation = Fafnir_SKL.Fafnir_RNA
    AnimationMode = LOOP
    End

    ConditionState = MOVING CENTER_TO_LEFT
    Animation = Fafnir_SKL.Fafnir_RNL
    AnimationMode = ONCE
    End
    AliasConditionState = MOVING RIGHT_TO_CENTER

    ConditionState = MOVING CENTER_TO_RIGHT
    Animation = Fafnir_SKL.Fafnir_RNR
    AnimationMode = ONCE
    End
    AliasConditionState = MOVING LEFT_TO_CENTER

    ConditionState = DAMAGED
    Model = Fafnir_D
    End

    ConditionState = MOVING DAMAGED
    Model = Fafnir_D
    Animation = Fafnir_SKL.Fafnir_RNA
    AnimationMode = LOOP
    End

    ConditionState = MOVING CENTER_TO_LEFT DAMAGED
    Model = Fafnir_D
    Animation = Fafnir_SKL.Fafnir_RNL
    AnimationMode = LOOP
    End
    AliasConditionState = MOVING RIGHT_TO_CENTER DAMAGED

    ConditionState = MOVING CENTER_TO_RIGHT DAMAGED
    Model = Fafnir_D
    Animation = Fafnir_SKL.Fafnir_RNR
    AnimationMode = LOOP
    End
    AliasConditionState = MOVING LEFT_TO_CENTER DAMAGED

    ConditionState = REALLYDAMAGED RUBBLE
    Model = Fafnir_D1
    End

    ConditionState = MOVING REALLYDAMAGED RUBBLE
    Model = Fafnir_D1
    Animation = Fafnir_SKL.Fafnir_RNA
    AnimationMode = LOOP
    End

    ConditionState = MOVING CENTER_TO_LEFT REALLYDAMAGED RUBBLE
    Model = Fafnir_D1
    Animation = Fafnir_SKL.Fafnir_RNL
    AnimationMode = LOOP
    End
    AliasConditionState = MOVING RIGHT_TO_CENTER REALLYDAMAGED RUBBLE

    ConditionState = MOVING CENTER_TO_RIGHT REALLYDAMAGED RUBBLE
    Model = Fafnir_D1
    Animation = Fafnir_SKL.Fafnir_RNR
    AnimationMode = LOOP
    End
    AliasConditionState = MOVING LEFT_TO_CENTER REALLYDAMAGED RUBBLE

    End

    ; ***DESIGN parameters ***
    DisplayName = OBJECT:Fafnir
    Side = CyberTech
    EditorSorting = VEHICLE
    TransportSlotCount = 0

    WeaponSet
    Conditions = None
    Weapon = PRIMARY StealthWeapon;FafnirTankGun
    ; Weapon = SECONDARY XpulseLaserCannon1
    ; Weapon = TERTIARY XpulseLaserCannon2
    ; PreferredAgainst = PRIMARY VEHICLE INFANTRY AIRCRAFT STRUCTURE
    ; PreferredAgainst = SECONDARY VEHICLE INFANTRY AIRCRAFT STRUCTURE
    ; PreferredAgainst = TERTIARY VEHICLE INFANTRY AIRCRAFT STRUCTURE
    End

    ArmorSet
    Conditions = None
    Armor = FafnirArmor
    DamageFX = TankDamageFX
    End

    BuildCost = 32000
    BuildTime = 55
    VisionRange = 300
    ShroudClearingRange = 300

    ExperienceValue = 400 600 1200 1600
    ExperienceRequired = 0 3000 5000 7000
    IsTrainable = Yes

    Prerequisites
    Object = CyberTechMechFactory
    Object = CyberTechAntiMaterialPlant
    Object = CyberTechTechnologieCenter
    Science = SCIENCE_fafnir
    End

    CrusherLevel = 3 ;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 = FafnirCommandSet

    MaxSimultaneousOfType = DeterminedBySuperweaponRestriction

    ; *** AUDIO Parameters ***
    VoiceSelect = FafnirVoiceSelect
    VoiceMove = FafnirVoiceMove
    VoiceGuard = FafnirVoiceMove
    VoiceAttack = FafnirVoiceMove
    SoundMoveStart = CrusaderTankMoveStart
    SoundMoveStartDamaged = CrusaderTankMoveStart
    UnitSpecificSounds
    VoiceCreate = FafnirVoiceCreate
    TurretMoveStart = NoSound
    TurretMoveLoop = NewTurretMoveLoop2
    VoiceEnter = NoSound
    Deploy = NoSound
    Undeploy = NoSound
    End

    ; *** ENGINEERING Parameters ***
    RadarPriority = UNIT
    KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE DRONE IMMUNE_TO_CAPTURE EMP_HARDENED

    Body = ActiveBody ModuleTag_02
    MaxHealth = 4400
    InitialHealth = 4400
    SubdualDamageCap = 5000
    SubdualDamageHealRate = 1100
    SubdualDamageHealAmount = 810
    End

    Behavior = AIUpdateInterface ModuleTag_03
    Turret
    TurretTurnRate = 120
    TurretPitchRate = 55
    MinPhysicalPitch = -60
    AllowsPitch = Yes
    ControlledWeaponSlots = PRIMARY SECONDARY TERTIARY
    MinIdleScanInterval = 550 ; in milliseconds
    MaxIdleScanInterval = 960 ; in milliseconds
    MinIdleScanAngle = -60 ; in degrees off the natural turret angle
    MaxIdleScanAngle = 60 ; in degrees off the natural turret angle
    End
    AutoAcquireEnemiesWhenIdle = Yes
    End

    Locomotor = SET_NORMAL FafnirLocomotor

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

    Behavior = PhysicsBehavior ModuleTag_04
    Mass = 100.0
    End

    ; Catch fire, and explode death
    Behavior = SlowDeathBehavior ModuleTag_07
    DeathTypes = ALL
    DestructionDelay = 1000
    DestructionDelayVariance = 300
    OCL = INITIAL OCL_FafnirDebris
    FX = INITIAL FX_ParticleUplinkDeathInitial
    OCL = INITIAL OCL_SDILinkLasers
    FX = FINAL FX_NukeGLA
    OCL = FINAL OCL_TankExpDeathEffect;OCL_ParticleUplinkDeathFina l
    End

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

    Behavior = TransitionDamageFX ModuleTag_0999
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
    End

    Behavior = AutoHealBehavior ModuleTag_29
    HealingAmount = 3
    HealingDelay = 1000 ; msec
    End

    Behavior = FireWeaponUpdate ModuleTag_30
    Weapon = StealthWeapon
    ExclusiveWeaponDelay = 10
    End

    Behavior = StealthUpdate ModuleTag_37
    StealthDelay = 0;2500 ; msec
    StealthForbiddenConditions = ATTACKING TAKING_DAMAGE
    FriendlyOpacityMin = 30.0%
    FriendlyOpacityMax = 100.0%
    InnateStealth = No
    RequiredStatus = STATUS_RIDER8
    OrderIdleEnemiesToAttackMeUponReveal = No
    EnemyDetectionEvaEvent = EnemyColonelBurtonDetected
    OwnDetectionEvaEvent = OwnColonelBurtonDetected
    End

    ; Behavior = StealthUpgrade ModuleTag_38
    ; TriggeredBy = Upgrade_Stealthbutton2
    ; End

    ; Behavior = StealthDetectorUpdate ModuleTag_39
    ; DetectionRate = 500 ; how often to rescan for stealthed things in my sight (msec)
    ; DetectionRange = 200 ;Dustin, enable this for independant balancing!
    ; CanDetectWhileGarrisoned = No ;Garrisoned means being in a structure that you units can shoot out of.
    ; CanDetectWhileContained = No ;Contained means being in a transport or tunnel network.
    ; End

    ; Behavior = CommandSetUpgrade ModuleTag_40
    ; CommandSet = FafnirCommandSet2
    ; TriggeredBy = Upgrade_StealthAvailable
    ; End

    Behavior = OCLSpecialPower ModuleTag_41
    SpecialPowerTemplate = SpecialPowerShield
    OCL = OCL_SpecialAbility_ActivateShield
    CreateLocation = USE_OWNER_OBJECT
    End

    Behavior = OCLSpecialPower ModuleTag_42
    SpecialPowerTemplate = SpecialPowerEmpPulse
    OCL = OCL_EMPEmitterEMPPulse
    CreateLocation = USE_OWNER_OBJECT
    End

    Behavior = OCLSpecialPower ModuleTag_43
    SpecialPowerTemplate = SuperweaponDetonateDirtyNukeFafnir
    OCL = SUPERWEAPON_DetonateDirtyNukeFafnir
    CreateLocation = USE_OWNER_OBJECT
    End

    Behavior = OCLSpecialPower ModuleTag_44
    SpecialPowerTemplate = SuperweaponTeslaBolt
    OCL = SUPERWEAPON_TeslaBolt
    CreateLocation = CREATE_ABOVE_LOCATION ;CREATE_AT_LOCATION
    End

    Behavior = OCLSpecialPower ModuleTag_45
    SpecialPowerTemplate = SuperweaponRailGun
    OCL = SUPERWEAPON_RailGun
    CreateLocation = CREATE_ABOVE_LOCATION ;CREATE_AT_LOCATION
    End

    Behavior = OverlordContain ModuleTag_Turret ; Like Transport, but when full, passes transport queries along to first passenger (redirects like tunnel)
    Slots = 1
    DamagePercentToUnits = 100%
    AllowInsideKindOf = PORTABLE_STRUCTURE
    PassengersAllowedToFire = Yes
    PassengersInTurret = Yes
    PayloadTemplateName = SupW_AmericaFafnirGunner
    ExperienceSinkForRider = Yes ; I get the Exp for things my turret friend kills
    End

    Geometry = BOX
    GeometryMajorRadius = 20.0
    GeometryMinorRadius = 20.0
    GeometryHeight = 30.0 ; Height set to allow clear clipping of projectile stream
    GeometryIsSmall = No
    Shadow = SHADOW_VOLUME
    ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length

    End

    Hier das Weapon:

    ;------------------------------------------------------------------------------
    Weapon StealthWeapon
    PrimaryDamage = 30000
    PrimaryDamageRadius = 200.0
    AttackRange = 200.0
    DamageType = STATUS
    DamageStatusType = STATUS_RIDER8
    DamageDealtAtSelfPosition = Yes
    WeaponSpeed = 999999.0
    DelayBetweenShots = 30000
    ClipSize = 0
    ClipReloadTime = 0
    LaserName = AvengerTargetingLaserBeam
    LaserBoneName = TurretFX03
    FireFX = WeaponFX_AvengerTargetDesignator
    FireSound = AvengerPaintWeaponLoop
    FireSoundLoopTime = 120
    End

    Und aktiviert/deaktiviert werden soll das mit diesem Button:

    CommandButton Command_StealthActivateDeactivate
    Command = FIRE_WEAPON
    WeaponSlot = PRIMARY
    Options = OK_FOR_MULTI_SELECT
    TextLabel = CONTROLBAR:StealthActivateDeactivate
    ButtonImage = StealthActivateDeactivate
    ButtonBorderType = BUILD
    DescriptLabel = CONTROLBAR:StealthActivateDeactivate2
    End

    Leider passiert nichts wenn ich den Button klick
    Any Ideas?

  • #2
    AW: Problem beim Ini coding StealthGenerator

    Füg mal das hier zur Waffe hinzu...
    RadiusDamageAffects = SELF
    Nature shot first!!!

    Kommentar


    • #3
      AW: Problem beim Ini coding StealthGenerator

      Zitat von Golan Beitrag anzeigen
      Füg mal das hier zur Waffe hinzu...
      Ne, passiert leider immer noch nichts. Man kann die aktivierung auch von einem upgrade abhängig machen doch dann kann mann die tarnung nichtmehr deaktivieren (oder doch???) . Vlt. irgendwie reupgraden oder so ?

      Kommentar


      • #4
        AW: Problem beim Ini coding StealthGenerator

        das mit tarnung asu schalten geht per rider change contain modul un OCL upgrade.

        Also du brauchst 2 dummys,2 OCL´s und 2 Upgrades

        dummy eins übernimt die funktion de sgetarnt seien,dummy 2 die funktion des sichtbar seiens.

        beide dummys müssen unterschiedliche namen haben sonst klapts nicht.
        Portfolio: http://helge-ph.daportfolio.com/

        Mein Marine-RTS: http://www.indiedb.com/games/ardent-seas/

        Kommentar


        • #5
          AW: Problem beim Ini coding StealthGenerator

          Danke Helge^^, aber ich bekomm es ja noch nichtmal hin das dass stealth überhaupt funzt. Vlt kann jemand ne kurze Anleitung schreiben mit den entsprechenden codes denn bin jetzt auch nich der ini coding crack.

          Kommentar


          • #6
            AW: Problem beim Ini coding StealthGenerator

            Kann mir da niemand helfen ?? Ich denk hier sind doch etliche gute Modder oder nicht??

            Kommentar


            • #7
              AW: Problem beim Ini coding StealthGenerator

              Lol was ist das hier bloß für ein Forum???

              Kommentar


              • #8
                AW: Problem beim Ini coding StealthGenerator

                Hier ist eine alternative Lösung:

                ;-----------------Stealth----------------------------------

                Behavior = StealthUpdate ModuleTag_09
                StealthDelay = 1000 ; msec
                StealthForbiddenConditions = ATTACKING TAKING_DAMAGE
                FriendlyOpacityMin = 50.0%
                FriendlyOpacityMax = 100.0%
                InnateStealth = Yes;No
                RequiredStatus = STATUS_RIDER5
                OrderIdleEnemiesToAttackMeUponReveal = No
                ; EnemyDetectionEvaEvent = EnemyColonelBurtonDetected
                ; OwnDetectionEvaEvent = OwnColonelBurtonDetected
                End

                Behavior = StatusBitsUpgrade ModuleTag_10
                TriggeredBy = Upgrade_Stealthbutton2
                RequiresAllTriggers = Yes
                StatusToSet = STATUS_RIDER5
                End

                Behavior = StatusBitsUpgrade ModuleTag_11
                TriggeredBy = Upgrade_UNStealth
                RequiresAllTriggers = Yes
                StatusToClear = STATUS_RIDER5
                End

                Behavior = CommandSetUpgrade ModuleTag_12
                CommandSet = FafnirCommandSet2
                TriggeredBy = Upgrade_Stealthbutton2
                RemovesUpgrades Upgrade_UNStealth
                End

                Behavior = CommandSetUpgrade ModuleTag_13
                CommandSet = FafnirCommandSet
                TriggeredBy = Upgrade_UNStealth
                RemovesUpgrades Upgrade_Stealthbutton2 Upgrade_UNStealth
                End

                Kommentar

                Lädt...
                X