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

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Gameanater  
#1 Posted : Saturday, June 21, 2014 6:31:05 PM(UTC)
Gameanater
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 5/13/2013(UTC)
Posts: 1,537
United States
Location: Right Behind You

Thanks: 574 times
Was thanked: 166 time(s) in 144 post(s)
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
Offline Gameanater  
#2 Posted : Saturday, June 21, 2014 6:33:46 PM(UTC)
Gameanater
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 5/13/2013(UTC)
Posts: 1,537
United States
Location: Right Behind You

Thanks: 574 times
Was thanked: 166 time(s) in 144 post(s)
Zombie unit's code:

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


Edited by user Saturday, June 21, 2014 6:34:24 PM(UTC)  | Reason: Not specified

Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Offline Gameanater  
#3 Posted : Saturday, June 21, 2014 6:35:36 PM(UTC)
Gameanater
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 5/13/2013(UTC)
Posts: 1,537
United States
Location: Right Behind You

Thanks: 574 times
Was thanked: 166 time(s) in 144 post(s)
Weapon code:

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.
Offline Gameanater  
#4 Posted : Saturday, June 21, 2014 9:22:36 PM(UTC)
Gameanater
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 5/13/2013(UTC)
Posts: 1,537
United States
Location: Right Behind You

Thanks: 574 times
Was thanked: 166 time(s) in 144 post(s)
Alright, I figured out what was wrong with the first problem and how to fix it.

Change this:
Code:
 ConditionState = FIRING_A
Animation = UIWRKR_SKL.UIWRKR_BDA
AnimationMode = LOOP
TransitionKey = TRANS_START_FIRING
End

Into this:
Code:
 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.
Offline klingondragon  
#5 Posted : Sunday, June 22, 2014 2:28:36 AM(UTC)
klingondragon
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 4/10/2014(UTC)
Posts: 1,591
United Kingdom
Location: Laniakea; Virgo Supercluster; Local Sheet; Local Group; Milky Way Galaxy; Orion–Cygnus Arm; Gould Belt; Local Bubble; Local Interstellar Cloud; Sol System; Sol III; Europe; United Kingdom of Great Britain and Northen Ireland; Great Britain; England; Essex

Thanks: 16 times
Was thanked: 247 time(s) in 217 post(s)
The code you've removed with ;[code] could probably be removed altogether other than that it looks fine to me
Offline Annihilationzh  
#6 Posted : Sunday, June 22, 2014 2:41:23 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)
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.

Originally Posted by: Gameanater Go to Quoted Post
-- When I press the Guard command button, the Guard icon covers more then the entire screen.

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.
thanks 2 users thanked Annihilationzh for this useful post.
CommieDog on 6/22/2014(UTC), Gameanater on 6/22/2014(UTC)
Offline Gameanater  
#7 Posted : Monday, June 23, 2014 6:39:47 PM(UTC)
Gameanater
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 5/13/2013(UTC)
Posts: 1,537
United States
Location: Right Behind You

Thanks: 574 times
Was thanked: 166 time(s) in 144 post(s)
Originally Posted by: Annihilationzh Go to Quoted Post
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.

Originally Posted by: Gameanater Go to Quoted Post
-- When I press the Guard command button, the Guard icon covers more then the entire screen.

Lower VisionRange.


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... Sad

In other news, I added some sounds for the Zombie. JarmenKellVoiceDie, which sounds the closest to a suffering undead person. Big Smile

Edited by user Tuesday, June 24, 2014 6:40:37 PM(UTC)  | Reason: Typo

Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Offline Annihilationzh  
#8 Posted : Tuesday, June 24, 2014 1:59:31 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)
Originally Posted by: Gameanater Go to Quoted Post
Yeah, using the Stinger Soldier was mistake. I took style over function and modded the most similar unit in APPEARANCE, not FUNCTION... Oops...

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.
thanks 3 users thanked Annihilationzh for this useful post.
Gameanater on 6/24/2014(UTC), V on 6/24/2014(UTC), CommieDog on 6/24/2014(UTC)
Offline Gameanater  
#9 Posted : Tuesday, June 24, 2014 7:09:08 PM(UTC)
Gameanater
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 5/13/2013(UTC)
Posts: 1,537
United States
Location: Right Behind You

Thanks: 574 times
Was thanked: 166 time(s) in 144 post(s)
Originally Posted by: Annihilationzh Go to Quoted Post
Originally Posted by: Gameanater Go to Quoted Post
Yeah, using the Stinger Soldier was mistake. I took style over function and modded the most similar unit in APPEARANCE, not FUNCTION... Oops...

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.


Well then...

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

Ah the trials of modding! Tongue

Edited by user Tuesday, June 24, 2014 7:09:47 PM(UTC)  | Reason: Not specified

Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Offline Gameanater  
#10 Posted : Wednesday, July 2, 2014 10:08:46 AM(UTC)
Gameanater
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 5/13/2013(UTC)
Posts: 1,537
United States
Location: Right Behind You

Thanks: 574 times
Was thanked: 166 time(s) in 144 post(s)
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.
Offline Gameanater  
#11 Posted : Wednesday, July 2, 2014 10:09:51 AM(UTC)
Gameanater
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 5/13/2013(UTC)
Posts: 1,537
United States
Location: Right Behind You

Thanks: 574 times
Was thanked: 166 time(s) in 144 post(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         = 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?

Edited by user Wednesday, July 2, 2014 10:10:33 AM(UTC)  | Reason: Not specified

Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Offline Annihilationzh  
#12 Posted : Wednesday, July 2, 2014 2:34:06 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: Gameanater Go to Quoted Post
Is there something I'm missing here?

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.

Originally Posted by: Gameanater Go to Quoted Post
Ugh, and can someone PLEASE tell me why the Code Tags aren't working right for me?

code=plain

Code:
 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.
thanks 1 user thanked Annihilationzh for this useful post.
Gameanater on 7/3/2014(UTC)
Offline Gameanater  
#13 Posted : Thursday, July 3, 2014 8:08:27 PM(UTC)
Gameanater
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 5/13/2013(UTC)
Posts: 1,537
United States
Location: Right Behind You

Thanks: 574 times
Was thanked: 166 time(s) in 144 post(s)
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.

Code:

    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.
Offline beng  
#14 Posted : Sunday, November 7, 2021 7:35:12 PM(UTC)
beng
Captain
Joined: 4/8/2009(UTC)
Posts: 57
Location: In a house

Thanks: 5 times
Was thanked: 5 time(s) in 3 post(s)
Originally Posted by: Gameanater Go to Quoted Post

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?


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.
Offline beng  
#15 Posted : Sunday, November 7, 2021 8:07:33 PM(UTC)
beng
Captain
Joined: 4/8/2009(UTC)
Posts: 57
Location: In a house

Thanks: 5 times
Was thanked: 5 time(s) in 3 post(s)
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.
Offline beng  
#16 Posted : Thursday, November 11, 2021 1:28:53 PM(UTC)
beng
Captain
Joined: 4/8/2009(UTC)
Posts: 57
Location: In a house

Thanks: 5 times
Was thanked: 5 time(s) in 3 post(s)
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.
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.