Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago
So I'm making a nice little Zombie Unit for my mod in Zero Hour, so far after several Errors of the Serious kind it's actually working fairly well. He can attack alright with a convincing enough melee strike. But I've got a few issues:

-- When I press the Guard command button, the Guard icon covers more then the entire screen.
-- After he attacks, he'll get stuck looping his attack animation, even while moving.
-- He will only attack enemies automatically if the enemy walks right next to him, due to the default range of his weapon.

I'm not sure how to fix these problems. I'll post the code for the Zombie and new weapon in the next couple of replies.

Any help would be appreciated.
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Sponsor
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago
Zombie unit's code:


 
; This ini is for all the new Zombie units for The Outbreak missions.
; They are put with the Toxin General's units because they are invincible to
; toxins and radiations and wouldn't fit too well anywhere else
; They are not a playable faction, just special units for the missions.
; -- Gameanater

Object Zomb_StandardZombie

  ;UpgradeCameo1 = Chem_Upgrade_GLAAnthraxGamma
  ; *** ART Parameters ***
  SelectPortrait         = SUStinger_L
  ButtonImage            = SUStinger

  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes

    DefaultConditionState
      Model = UISmsd_SKN
      IdleAnimation = UIWRKR_SKL.UIWRKR_CARST 30
      AnimationMode = ONCE
      WeaponMuzzleFlash = PRIMARY MuzzleFX
      WeaponFireFXBone = PRIMARY Exhaust
      WeaponLaunchBone = PRIMARY Muzzle
      WeaponFireFXBone = SECONDARY Exhaust
      WeaponLaunchBone = SECONDARY Muzzle

      WaitForStateToFinishIfPossible = TRANS_START_FIRING

    End
    AliasConditionState = BETWEEN_FIRING_SHOTS_A
    AliasConditionState = BETWEEN_FIRING_SHOTS_B
    AliasConditionState = RELOADING_A
    AliasConditionState = RELOADING_B

    ConditionState  = MOVING
      Animation     = UIWRKR_SKL.UIWRKR_CARY 12
      AnimationMode = LOOP
      Flags         = RANDOMSTART
      TransitionKey = TRANS_Moving
      ParticleSysBone = None InfantryDustTrails
    End

    ConditionState = DYING
      Animation = UISmsd_SKL.UISmsd_DTA 
      Animation = UISmsd_SKL.UISmsd_DTB 
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
      WaitForStateToFinishIfPossible = NONE ; We got a Key from Default state, but Death does not need to wait for firing to finish
    End

    TransitionState = TRANS_Dying TRANS_Flailing
      Animation = UISmsd_SKL.UISmsd_ADTF1
      Animation = UISmsd_SKL.UISmsd_ADTG21
      AnimationMode = ONCE
    End

    ConditionState = DYING EXPLODED_FLAILING
      Animation = UISmsd_SKL.UISmsd_ADTF2
      Animation = UISmsd_SKL.UISmsd_ADTG22
      AnimationMode = LOOP
      TransitionKey = TRANS_Flailing
      WaitForStateToFinishIfPossible = NONE ; We got a Key from Default state, but Death does not need to wait for firing to finish
    End

    ConditionState = DYING EXPLODED_BOUNCING
      Animation = UISmsd_SKL.UISmsd_ADTF3
      Animation = UISmsd_SKL.UISmsd_ADTG23
      AnimationMode = ONCE
      TransitionKey = None
      WaitForStateToFinishIfPossible = NONE ; We got a Key from Default state, but Death does not need to wait for firing to finish
    End

    ConditionState = FIRING_A
      Animation = UIWRKR_SKL.UIWRKR_BDA
      AnimationMode = LOOP
      TransitionKey = TRANS_START_FIRING
    End
    ; AliasConditionState is a new keyword that says,
    ; "give me another ConditionState exactly like the previous
    ; one, except with different conditions". Useful when you
    ; have several states that are the same with only different condition bits.
    ; these aliases handle the moving-between-shots case. (we can't actually move-and-fire at the same time.).
    AliasConditionState = MOVING FIRING_A
    AliasConditionState = MOVING RELOADING_A

    ConditionState = FIRING_B
      Animation = UISmsd_SKL.UISmsd_ATB
      AnimationMode = ONCE
      TransitionKey = TRANS_START_FIRINGB
    End
    ; AliasConditionState is a new keyword that says,
    ; "give me another ConditionState exactly like the previous
    ; one, except with different conditions". Useful when you
    ; have several states that are the same with only different condition bits.
    ; these aliases handle the moving-between-shots case. (we can't actually move-and-fire at the same time.).
    AliasConditionState = MOVING FIRING_B
    AliasConditionState = MOVING RELOADING_B


    ConditionState = SPECIAL_CHEERING
      Animation = UISMSD_SKL.UISMSD_CHA
      AnimationMode = LOOP
    End

  End

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:StingerSoldier
  Side = GLAToxinGeneral
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY   WeakZombieMelee
    AutoChooseSources   = PRIMARY   FROM_PLAYER FROM_AI FROM_SCRIPT
;    Weapon              = SECONDARY GC_Chem_StingerMissileWeaponAirBeta
;    PreferredAgainst    = SECONDARY BALLISTIC_MISSILE AIRCRAFT
  End
;  WeaponSet
;    Conditions          = PLAYER_UPGRADE
;    Weapon              = PRIMARY   GC_Chem_StingerMissileWeaponGamma
;    AutoChooseSources   = PRIMARY   FROM_PLAYER FROM_AI FROM_SCRIPT
;    Weapon              = SECONDARY GC_Chem_StingerMissileWeaponAirGamma
;    PreferredAgainst    = SECONDARY BALLISTIC_MISSILE AIRCRAFT
;  End
  ArmorSet
    Conditions      = None
    Armor           = HazMatHumanArmor
    DamageFX        = InfantryDamageFX
  End
  VisionRange = 400.0
  ShroudClearingRange = 400

  Prerequisites
    Object = GC_Chem_GLABarracks
  End
  BuildCost = 100
  BuildTime = 1.0          ;in seconds    
  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

  CommandSet      = GenericCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = StingerSoldierVoiceSelect
  VoiceMove = StingerSoldierVoiceMove
  VoiceAttack = StingerSoldierVoiceAttack

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS INFANTRY SALVAGER SCORE ATTACK_NEEDS_LINE_OF_SIGHT

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 200.0
    InitialHealth   = 200.0
  End

  Behavior = StealthDetectorUpdate ModuleTag_16
    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 = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
    MoodAttackCheckRate        = 250
  End
  Locomotor = SET_NORMAL BasicHumanLocomotor
  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 5.0
  End
  Behavior = SlavedUpdate ModuleTag_06
    ;nothing
  End
;  Behavior = ProneUpdate ModuleTag_07
;    DamageToFramesRatio = 5.0 ; I take 20 damage, I go prone for 100.  For this guy, if any of my buds or my building take damage too (I have SlaveUpdate + ProneUpdate) Prone may get cut by itself though
;  End

  Behavior = SquishCollide ModuleTag_08
    ;nothing
  End
;  Behavior = WeaponSetUpgrade ModuleTag_09
;    TriggeredBy   = Chem_Upgrade_GLAAnthraxGamma
;  End

  ;Kris: Cut camo-netting from Chem General
  ;Behavior = StealthUpdate ModuleTag_10
  ;  StealthDelay                = 2500 ; msec
  ;  StealthForbiddenConditions  = ATTACKING USING_ABILITY NO_BLACK_MARKET
  ;  MoveThresholdSpeed          = 3
  ;  InnateStealth               = No ;Requires upgrade first
  ;  OrderIdleEnemiesToAttackMeUponReveal  = Yes
  ;End
  ;Behavior = StealthUpgrade ModuleTag_11
  ;  TriggeredBy = Upgrade_GLACamoNetting
  ;End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_StingerSoldierDie
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_StingerSoldierDie
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireGLA
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
    DeathTypes          = NONE +POISONED_BETA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End
  Behavior = SlowDeathBehavior ModuleTag_Death07
    DeathTypes          = NONE +POISONED_GAMMA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End

; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_14
    PoisonDamageInterval = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration = 3000       ; ... for this long after last hit by poison damage
  End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14
  ShadowSizeY = 14
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End



Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago
Weapon code:

 Weapon WeakZombieMelee
  PrimaryDamage = 20.0            
  PrimaryDamageRadius = 1.0      
  AttackRange = 1.0
  DamageType = Falling 
  DeathType = POISONED_BETA
  WeaponSpeed = 99999.0
  ProjectileObject = NONE
  FireFX = FX_DamageInfantryBlood
;  FireOCL = OCL_PoisonFieldGammaSmall
  FireSound = HeroUSAKnifeAttack
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 1596                   ; time between shots, msec
  ClipSize = 1                            ; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 1600                      ; how long to reload a Clip, msec
  PreAttackDelay        = 0                ; 1600 is natural time of the "hammer" animation for a Worker
  PreAttackType         =  PER_ATTACK ; ---- No Idea
  AutoReloadsClip = Yes 
  AntiGround = Yes
  DamageDealtAtSelfPosition = No
End 

Could someone also tell me why the Code embed tag things keep removing the spaces even though they're designed specifically to NOT remove spaces?
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago
Alright, I figured out what was wrong with the first problem and how to fix it.

Change this:
 ConditionState = FIRING_A
Animation = UIWRKR_SKL.UIWRKR_BDA
AnimationMode = LOOP
TransitionKey = TRANS_START_FIRING
End
Into this:
 ConditionState = FIRING_A
Animation = UIWRKR_SKL.UIWRKR_BDA
AnimationMode = ONCE
TransitionKey = TRANS_START_FIRINGA
End

(I also changed the first time TRANS_START_FIRING was mentioned in the code to TRANS_START_FIRINGA.)

But now he's kinda frozen solid like a mannequin unless he's just finished attacking... Move him and he stops and stares blankly into space not moving a muscle....
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
klingondragon
11 years ago
The code you've removed with ;[code] could probably be removed altogether other than that it looks fine to me
Annihilationzh
11 years ago
You shouldn't use the stinger soldier as the base code for a unit like this. You would have been much better off using the terrorist because it has a similarly short ranged weapon.

-- When I press the Guard command button, the Guard icon covers more then the entire screen.

Originally Posted by: Gameanater 


Lower VisionRange.
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.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago

You shouldn't use the stinger soldier as the base code for a unit like this. You would have been much better off using the terrorist because it has a similarly short ranged weapon.

-- When I press the Guard command button, the Guard icon covers more then the entire screen.

Originally Posted by: Annihilationzh 


Lower VisionRange.

Originally Posted by: Gameanater 



Yeah, using the Stinger Soldier was mistake. I took style over function and modded the most similar unit in APPEARANCE, not FUNCTION... Oops...

Well I looked at the Terrorist's weapon and found this:

LeechRangeWeapon = Yes

I added that to my Zombie's weapon, but no change. I saw nothing in the Terrorist's own code that would help me, unless I missed it... 😞

In other news, I added some sounds for the Zombie. JarmenKellVoiceDie, which sounds the closest to a suffering undead person. 😁
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Annihilationzh
11 years ago

Yeah, using the Stinger Soldier was mistake. I took style over function and modded the most similar unit in APPEARANCE, not FUNCTION... Oops...

Originally Posted by: Gameanater 


It's more because the stinger soldier is a slave to the stinger site, so there's a lot of code that will mess up your unit.
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.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago

Yeah, using the Stinger Soldier was mistake. I took style over function and modded the most similar unit in APPEARANCE, not FUNCTION... Oops...

Originally Posted by: Annihilationzh 


It's more because the stinger soldier is a slave to the stinger site, so there's a lot of code that will mess up your unit.

Originally Posted by: Gameanater 



Well then...

Guess I gotta go through and comment out any Slave code....

Ah the trials of modding! 😛
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago
Alright, I've gone through and commented out the only piece of code that I could recognize as being Slave Code, but not very much change.

He still doesn't automatically attack enemies while standing still, I have to either order him to Guard an area or just manually order him to attack.

Good news is that Guard is working flawlessly for him, and that he DOES retaliate if attacked by another enemy.

Is there something I'm missing here?
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago

; This ini is for all the new Zombie units for The Outbreak missions.
; They are put with the Toxin General's units because they are invincible to
; toxins and radiations and wouldn't fit too well anywhere else
; They are not a playable faction, just special units for the missions.
; -- Gameanater

Object Zomb_StandardZombie

  ;UpgradeCameo1 = Chem_Upgrade_GLAAnthraxGamma
  ; *** ART Parameters ***
  SelectPortrait         = SSAnthraxBeta
  ButtonImage            = SSAnthraxBeta

  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes

    DefaultConditionState
      Model = UISmsd_SKN
      IdleAnimation = UIWRKR_SKL.UIWRKR_CARST 30
      AnimationMode = ONCE
      WeaponMuzzleFlash = PRIMARY MuzzleFX
      WeaponFireFXBone = PRIMARY Exhaust
      WeaponLaunchBone = PRIMARY Muzzle
      WeaponFireFXBone = SECONDARY Exhaust
      WeaponLaunchBone = SECONDARY Muzzle

      WaitForStateToFinishIfPossible = TRANS_START_FIRINGA

    End
    AliasConditionState = BETWEEN_FIRING_SHOTS_A
    AliasConditionState = BETWEEN_FIRING_SHOTS_B
    AliasConditionState = RELOADING_A
    AliasConditionState = RELOADING_B

    ConditionState  = MOVING
      Animation     = UIWRKR_SKL.UIWRKR_CARY 12
      AnimationMode = LOOP
      Flags         = RANDOMSTART
      TransitionKey = TRANS_Moving
      ParticleSysBone = None InfantryDustTrails
    End

    ConditionState = DYING
      Animation = UISmsd_SKL.UISmsd_DTA 
      Animation = UISmsd_SKL.UISmsd_DTB 
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
      WaitForStateToFinishIfPossible = NONE ; We got a Key from Default state, but Death does not need to wait for firing to finish
    End

    TransitionState = TRANS_Dying TRANS_Flailing
      Animation = UISmsd_SKL.UISmsd_ADTF1
      Animation = UISmsd_SKL.UISmsd_ADTG21
      AnimationMode = ONCE
    End

    ConditionState = DYING EXPLODED_FLAILING
      Animation = UISmsd_SKL.UISmsd_ADTF2
      Animation = UISmsd_SKL.UISmsd_ADTG22
      AnimationMode = LOOP
      TransitionKey = TRANS_Flailing
      WaitForStateToFinishIfPossible = NONE ; We got a Key from Default state, but Death does not need to wait for firing to finish
    End

    ConditionState = DYING EXPLODED_BOUNCING
      Animation = UISmsd_SKL.UISmsd_ADTF3
      Animation = UISmsd_SKL.UISmsd_ADTG23
      AnimationMode = ONCE
      TransitionKey = None
      WaitForStateToFinishIfPossible = NONE ; We got a Key from Default state, but Death does not need to wait for firing to finish
    End

    ConditionState = FIRING_A
      Animation = UIWRKR_SKL.UIWRKR_BDA
      AnimationMode = ONCE
      TransitionKey = TRANS_START_FIRINGA
    End
    ; AliasConditionState is a new keyword that says,
    ; "give me another ConditionState exactly like the previous
    ; one, except with different conditions". Useful when you
    ; have several states that are the same with only different condition bits.
    ; these aliases handle the moving-between-shots case. (we can't actually move-and-fire at the same time.).
    AliasConditionState = MOVING FIRING_A
    AliasConditionState = MOVING RELOADING_A

    ConditionState = FIRING_B
      Animation = UISmsd_SKL.UISmsd_ATB
      AnimationMode = ONCE
      TransitionKey = TRANS_START_FIRINGB
    End
    ; AliasConditionState is a new keyword that says,
    ; "give me another ConditionState exactly like the previous
    ; one, except with different conditions". Useful when you
    ; have several states that are the same with only different condition bits.
    ; these aliases handle the moving-between-shots case. (we can't actually move-and-fire at the same time.).
    AliasConditionState = MOVING FIRING_B
    AliasConditionState = MOVING RELOADING_B


    ConditionState = SPECIAL_CHEERING
      Animation = UISMSD_SKL.UISMSD_CHA
      AnimationMode = LOOP
    End

  End

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:Zombie
  Side = GLAToxinGeneral
  EditorSorting = INFANTRY
  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY   WeakZombieMelee
    AutoChooseSources   = PRIMARY   FROM_PLAYER FROM_AI FROM_SCRIPT
;    Weapon              = SECONDARY GC_Chem_StingerMissileWeaponAirBeta
;    PreferredAgainst    = SECONDARY BALLISTIC_MISSILE AIRCRAFT
  End
;  WeaponSet
;    Conditions          = PLAYER_UPGRADE
;    Weapon              = PRIMARY   GC_Chem_StingerMissileWeaponGamma
;    AutoChooseSources   = PRIMARY   FROM_PLAYER FROM_AI FROM_SCRIPT
;    Weapon              = SECONDARY GC_Chem_StingerMissileWeaponAirGamma
;    PreferredAgainst    = SECONDARY BALLISTIC_MISSILE AIRCRAFT
;  End
  ArmorSet
    Conditions      = None
    Armor           = HazMatHumanArmor
    DamageFX        = InfantryDamageFX
  End
  VisionRange = 150.0
  ShroudClearingRange = 200

  Prerequisites
    Object = GC_Chem_GLABarracks
  End
  BuildCost = 100
  BuildTime = 1.0          ;in seconds    
  CrushableLevel         = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

  CommandSet      = GenericCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = JarmenKellVoiceDie    ;StingerSoldierVoiceSelect
  VoiceMove = JarmenKellVoiceDie    ;StingerSoldierVoiceMove
  VoiceAttack = JarmenKellVoiceDie    ;StingerSoldierVoiceAttack

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS INFANTRY SALVAGER SCORE ATTACK_NEEDS_LINE_OF_SIGHT

  Body = ActiveBody ModuleTag_02
    MaxHealth       = 200.0
    InitialHealth   = 200.0
  End

  Behavior = StealthDetectorUpdate ModuleTag_16
    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 = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
    MoodAttackCheckRate        = 250
  End
  Locomotor = SET_NORMAL BasicHumanLocomotor
  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 5.0
  End
;  Behavior = SlavedUpdate ModuleTag_06
;    ;nothing
;  End
;  Behavior = ProneUpdate ModuleTag_07
;    DamageToFramesRatio = 5.0 ; I take 20 damage, I go prone for 100.  For this guy, if any of my buds or my building take damage too (I have SlaveUpdate + ProneUpdate) Prone may get cut by itself though
;  End

  Behavior = SquishCollide ModuleTag_08
    ;nothing
  End
;  Behavior = WeaponSetUpgrade ModuleTag_09
;    TriggeredBy   = Chem_Upgrade_GLAAnthraxGamma
;  End

  ;Kris: Cut camo-netting from Chem General
  ;Behavior = StealthUpdate ModuleTag_10
  ;  StealthDelay                = 2500 ; msec
  ;  StealthForbiddenConditions  = ATTACKING USING_ABILITY NO_BLACK_MARKET
  ;  MoveThresholdSpeed          = 3
  ;  InnateStealth               = No ;Requires upgrade first
  ;  OrderIdleEnemiesToAttackMeUponReveal  = Yes
  ;End
  ;Behavior = StealthUpgrade ModuleTag_11
  ;  TriggeredBy = Upgrade_GLACamoNetting
  ;End


; --- begin Death modules ---
  Behavior = SlowDeathBehavior ModuleTag_Death01
    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_StingerSoldierDie
  End
  Behavior = SlowDeathBehavior ModuleTag_Death02
    DeathTypes          = NONE +CRUSHED +SPLATTED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_GIDieCrushed
  End
  Behavior = SlowDeathBehavior ModuleTag_Death03
    DeathTypes          = NONE +EXPLODED
    SinkDelay           = 3000
    SinkRate            = 0.5     ; in Dist/Sec
    DestructionDelay    = 8000
    FX                  = INITIAL FX_StingerSoldierDie
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireGLA
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
    DeathTypes          = NONE +POISONED_BETA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
  End
  Behavior = SlowDeathBehavior ModuleTag_Death07
    DeathTypes          = NONE +POISONED_GAMMA
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinGLA
    OCL                 = INITIAL OCL_ToxicInfantryGamma
  End

; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_14
    PoisonDamageInterval = 100  ; Every this many msec I will retake the poison damage dealt me...
    PoisonDuration = 3000       ; ... for this long after last hit by poison damage
  End
 
  Geometry = CYLINDER
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 12.0
  GeometryIsSmall = Yes
  Shadow = SHADOW_DECAL
  ShadowSizeX = 14
  ShadowSizeY = 14
  ShadowTexture = ShadowI;
  BuildCompletion = APPEARS_AT_RALLY_POINT

End




Ugh, and can someone PLEASE tell me why the Code Tags aren't working right for me?
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Annihilationzh
11 years ago

Is there something I'm missing here?

Originally Posted by: Gameanater 


You haven't started again using a better base unit. I'm not going to help you do this the hard way when you can do it the easy way.

Ugh, and can someone PLEASE tell me why the Code Tags aren't working right for me?

Originally Posted by: Gameanater 


code=plain

 DefaultConditionState
  Model = UISmsd_SKN
  IdleAnimation = UIWRKR_SKL.UIWRKR_CARST 30
  AnimationMode = ONCE
  WeaponMuzzleFlash = PRIMARY MuzzleFX
  WeaponFireFXBone = PRIMARY Exhaust
  WeaponLaunchBone = PRIMARY Muzzle
  WeaponFireFXBone = SECONDARY Exhaust
  WeaponLaunchBone = SECONDARY Muzzle

  WaitForStateToFinishIfPossible = TRANS_START_FIRINGA

 End
Quod Erat Demonstrandum.
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.
Gameanater
  • Gameanater
  • 55.5% (Neutral)
  • General Topic Starter
11 years ago
Gee you're a big help.

...

Just kidding. xD I may as well do what you said, I'll try modding a Terrorist and see if that makes any difference.


And THANK YOU for telling me how the Code Tag works.


    It
     Really
      Helps
       A
        Lot
         🙂

Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
beng
  • beng
  • 66.5% (Friendly)
  • Captain
4 years ago


He still doesn't automatically attack enemies while standing still, I have to either order him to Guard an area or just manually order him to attack.

Good news is that Guard is working flawlessly for him, and that he DOES retaliate if attacked by another enemy.

Is there something I'm missing here?

Originally Posted by: Gameanater 



Give it an additional dummy weapon that does a trivial amount of damage but has longer range than the zombie weapon. It will use the longer range to decide to attack. I can't remember whether the dummy weapon should be in the primary or secondary slot. Try and see.
beng
  • beng
  • 66.5% (Friendly)
  • Captain
4 years ago
Zombies should make the victims become more zombies.

To achieve this effect, have the zombie weapon use an invisible projectile that creates a zombie when it dies.
The down side to this is that the player can spawn zombies by force firing on the ground. To prevent this, have the weapon choose sources not include player, AI only. The player just controls the dummy weapon. Also the target objects should have a special destroy die death for the deathtype of the zombie weapon (zombie weapon should use an unused death type) so that they just disappear when killed by a zombie.
beng
  • beng
  • 66.5% (Friendly)
  • Captain
4 years ago
Another way: When infantry dies to a zombie, it creates a crate that the zombie hits since it is close to it when attacking, and the crate makes another zombie. The crate can look like a zombie too so you don't see it as a box.