The White Lightning infantry are elite forces used during extreme conditions. Now, they can be upgraded individually to carry a smoke grenade. When the Commando Soldier throws his smoke grenade by button command, when the Sniper throws his grenade, it calls in a plane. Now, to throw these, you have to use a button. But for some reason the Sniper soldier throws his grenade anyway, without using the button. How do I fix this?
Code:
Object NekoInfantryWhiteLightningCommando
SelectPortrait = WhiteGuard
ButtonImage = WhiteGuard
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
Model = AWMNLIGHTSMG
IdleAnimation = NIFOOTMAN_S.NIFOOTMAN_ST 0 35
IdleAnimation = NIFOOTMAN_S.NIFOOTMAN_I1
IdleAnimation = NIFOOTMAN_S.NIFOOTMAN_I2
AnimationMode = ONCE
WeaponFireFXBone = PRIMARY Muzzle
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponLaunchBone = PRIMARY Muzzle
TransitionKey = TRANS_Stand
HideSubObject = BLOOD
End
ConditionState = USING_WEAPON_A
Animation = NIFOOTMAN_S.NIFOOTMAN_A1
AnimationMode = LOOP
TransitionKey = TRANS_Firing
End
TransitionState = TRANS_Stand TRANS_Firing
Animation = NIFOOTMAN_S.NIFOOTMAN_A1
AnimationMode = ONCE
End
TransitionState = TRANS_Firing TRANS_Stand
Animation = NIFOOTMAN_S.NIFOOTMAN_A1
AnimationMode = ONCE
End
ConditionState = FREEFALL
Animation = PARAJUMPSK.PARAJUMP
AnimationMode = MANUAL
Flags = START_FRAME_FIRST
TransitionKey = TRANS_Falling
End
AliasConditionState = FREEFALL DYING
ConditionState = PARACHUTING
Animation = PARAFALLSK.PARAFALL
AnimationMode = LOOP
Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME ; our bone positions should come from the last frame, rather than the first
TransitionKey = TRANS_Chute
End
AliasConditionState = PARACHUTING DYING
TransitionState = TRANS_Falling TRANS_Chute
Animation = PARAJUMPSK.PARAJUMP
AnimationMode = ONCE
Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME ; our bone positions should come from the last frame, rather than the first
End
TransitionState = TRANS_Chute TRANS_Stand
Animation = PARALANDSK.PARALAND
AnimationMode = ONCE
End
ConditionState = MOVING
Animation = NIFOOTMAN_S.NIFOOTMAN_R1 26
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = None
ParticleSysBone = None InfantryDustTrails
End
AliasConditionState = MOVING ATTACKING
ConditionState = DYING
Animation = NIFOOTMAN_S.NIFOOTMAN_DB1
Animation = NIFOOTMAN_S.NIFOOTMAN_DB3
Animation = NIFOOTMAN_S.NIFOOTMAN_DF1
AnimationMode = ONCE
TransitionKey = TRANS_Dying
ShowSubObject = BLOOD
End
TransitionState = TRANS_Dying TRANS_Flailing
Animation = NIFOOTMAN_S.NIFOOTMAN_DB2
AnimationMode = ONCE
End
ConditionState = DYING EXPLODED_FLAILING
Animation = NIFOOTMAN_S.NIFOOTMAN_DB2
AnimationMode = LOOP
TransitionKey = TRANS_Flailing
End
ConditionState = DYING EXPLODED_BOUNCING
Animation = NIFOOTMAN_S.NIFOOTMAN_DB2
AnimationMode = ONCE
TransitionKey = None
End
End
DisplayName = OBJECT:WhiteLightning
Side = Neko
EditorSorting = INFANTRY
TransportSlotCount = 1
WeaponSet
Conditions = None
Weapon = PRIMARY NekoWLightningSMG
End
WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY NekoWLightningSMG
Weapon = SECONDARY AWMSmokeGrenade
PreferredAgainst = SECONDARY NONE
End
ArmorSet
Conditions = None
Armor = HumanArmor
DamageFX = InfantryDamageFX
End
VisionRange = 200
ShroudClearingRange = 200
BuildCost = 750
BuildTime = 15.0
ExperienceValue = 25 25 25 25 ;Experience point value at each level
ExperienceRequired = 0 25 50 75 ;Experience points needed to gain each level
IsTrainable = Yes ;Can gain experience
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = NekoketsukeiInfantryWLCommandoCommandSet
VoiceSelect = JapaneseSelect
VoiceMove = JapaneseMove
VoiceGuard = JapaneseMove
VoiceAttack = JapaneseAttack
SoundStealthOn = StealthOn
SoundStealthOff = StealthOff
VoiceFear = JapaneseHurt
VoiceTaskComplete = JapaneseCreated
UnitSpecificSounds
VoiceCreate = JapaneseCreated
VoiceSubdue = JapaneseAttack
VoiceGarrison = JapaneseMove
VoiceEnter = JapaneseMove
VoiceEnterHostile = JapaneseAttack
VoiceGetHealed = JapaneseHurt
End
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SALVAGER SCORE
Body = ActiveBody ModuleTag_02
MaxHealth = 90.0
InitialHealth = 90.0
End
Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = No
End
Behavior = CommandButtonHuntUpdate ModuleTag_04 ; allows use of command button hunt script with this unit.
End
Behavior = StealthUpdate ModuleTag_05
StealthDelay = 1500
StealthForbiddenConditions = USING_ABILITY ATTACKING
InnateStealth = Yes
OrderIdleEnemiesToAttackMeUponReveal = Yes
End
Behavior = ProductionUpdate ModuleTag_08
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End
Behavior = MaxHealthUpgrade ModuleTag_11
TriggeredBy = Upgrade_TabukArmor
AddMaxHealth = 45.0
ChangeType = ADD_CURRENT_HEALTH_TOO
End
Locomotor = SET_NORMAL BasicHumanLocomotor
Locomotor = SET_NORMAL_UPGRADED BasicSteroidsHumanLocomotor
Behavior = LocomotorSetUpgrade ModuleTag_12
TriggeredBy = Upgrade_InfantrySteroids
End
Behavior = PhysicsBehavior ModuleTag_14
Mass = 5.0
End
; Behavior = SquishCollide ModuleTag_15
; ;nothing
; End
Behavior = SlowDeathBehavior ModuleTag_Death01
DeathTypes = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
SinkDelay = 30000
SinkRate = 1.0 ; in Dist/Sec
DestructionDelay = 45000
FX = INITIAL FX_DieJapanese
OCL = INITIAL OCL_BloodFXAWM
End
Behavior = SlowDeathBehavior ModuleTag_Death02
DeathTypes = NONE +CRUSHED +SPLATTED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 1
OCL = INITIAL OCL_AWMGibbed
FX = INITIAL FX_GibbedFire
End
Behavior = SlowDeathBehavior ModuleTag_Death03A
DeathTypes = NONE +EXPLODED
SinkDelay = 30000
SinkRate = 1.0 ; in Dist/Sec
DestructionDelay = 45000
ProbabilityModifier = 50
FX = INITIAL FX_DieJapanese
FlingForce = 9
FlingForceVariance = 5
FlingPitch = 60
FlingPitchVariance = 10
End
Behavior = SlowDeathBehavior ModuleTag_Death03B
DeathTypes = NONE +EXPLODED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 1
ProbabilityModifier = 50
OCL = INITIAL OCL_AWMGibbed
FX = INITIAL FX_GibbedFire
End
Behavior = SlowDeathBehavior ModuleTag_Death04
DeathTypes = NONE +BURNED
DestructionDelay = 0
FX = INITIAL FX_DieJapanese
OCL = INITIAL OCL_FlamingInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death05
DeathTypes = NONE +POISONED
DestructionDelay = 0
FX = INITIAL FX_DieJapanese
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_DieJapanese
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_DieJapanese
OCL = INITIAL OCL_ToxicInfantryGamma
End
Behavior = PoisonedBehavior ModuleTag_16
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
Behavior = AutoHealBehavior ModuleTag_17
HealingAmount = 5
HealingDelay = 2000 ; msec
TriggeredBy = Upgrade_MedPacks
End
Behavior = WeaponBonusUpgrade ModuleTag_18
TriggeredBy = Upgrade_Hollowpoint
End
Behavior = SpecialAbility ModuleTag_19
SpecialPowerTemplate = SpecialAbilityWhiteLightningCommandoPlantC4
UpdateModuleStartsAttack = Yes
InitiateSound = ColonelBurtonVoicePlantTimedCharge
End
Behavior = SpecialAbilityUpdate ModuleTag_20
SpecialPowerTemplate = SpecialAbilityWhiteLightningCommandoPlantC4
StartAbilityRange = 0.0
PreparationTime = 0
SpecialObject = NekoTimeFusionC4
MaxSpecialObjects = 10
SpecialObjectsPersistWhenOwnerDies = Yes
SpecialObjectsPersistent = Yes
UniqueSpecialObjectTargets = Yes
UnpackTime = 100
FlipOwnerAfterUnpacking = Yes
FleeRangeAfterCompletion = 150.0
UnpackSound = ColonelBurtonPlantCharge
LoseStealthOnTrigger = No
PreTriggerUnstealthTime = 5000
End
Behavior = CommandSetUpgrade ModuleTag_USESMKGRD
TriggeredBy = Upgrade_SmokeGrenades
CommandSet = NekoketsukeiInfantryWLCommandoCommandSetUP
End
Behavior = WeaponSetUpgrade ModuleTag_GETSMKGRD
TriggeredBy = Upgrade_SmokeGrenades
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
Scale = 1.06
End
Code:
Object NekoInfantryWhiteLightningSniper
SelectPortrait = WhiteGuard
ButtonImage = WhiteGuard
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
Model = AWMNLIGHTSNP
IdleAnimation = AIPFDR_SKL.AIPFDR_STA
IdleAnimation = AIPFDR_SKL.AIPFDR_IDA
AnimationMode = ONCE
WeaponFireFXBone = PRIMARY Muzzle
WeaponMuzzleFlash = PRIMARY MuzzleFX
TransitionKey = TRANS_Standing
HideSubObject = BLOOD
End
AliasConditionState = REALLYDAMAGED
ConditionState = MOVING
Animation = AIPFDR_SKL.AIPFDR_RNA 25
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = TRANS_Standing
ParticleSysBone = None InfantryDustTrails
End
AliasConditionState = MOVING REALLYDAMAGED
ConditionState = FIRING_A
Animation = AIPFDR_SKL.AIPFDR_ATB ; recoil in standing position
AnimationMode = ONCE
TransitionKey = TRANS_FiringA
End
AliasConditionState = FIRING_A MOVING
AliasConditionState = FIRING_A MOVING REALLYDAMAGED
AliasConditionState = FIRING_A REALLYDAMAGED
ConditionState = BETWEEN_FIRING_SHOTS_A
Animation = AIPFDR_SKL.AIPFDR_ATBST ; motionless in standing position
AnimationMode = ONCE
WaitForStateToFinishIfPossible = TRANS_FiringA
End
AliasConditionState = BETWEEN_FIRING_SHOTS_A REALLYDAMAGED
AliasConditionState = RELOADING_A
AliasConditionState = RELOADING_A REALLYDAMAGED
ConditionState = DYING
Animation = AIPFDR_SKL.AIPFDR_DTA
AnimationMode = ONCE
TransitionKey = TRANS_Dying
ShowSubObject = BLOOD
End
TransitionState = TRANS_Dying TRANS_Flailing
Animation = AIPFDR_SKL.AIPFDR_ADTA1
AnimationMode = ONCE
End
ConditionState = DYING EXPLODED_FLAILING
Animation = AIPFDR_SKL.AIPFDR_ADTA2
AnimationMode = LOOP
TransitionKey = TRANS_Flailing
End
ConditionState = DYING EXPLODED_BOUNCING
Animation = AIPFDR_SKL.AIPFDR_ADTA3
AnimationMode = ONCE
TransitionKey = None
End
ConditionState = FREEFALL
Animation = AIPFDR_SKL.AIPFDR_PFL
AnimationMode = LOOP
TransitionKey = TRANS_Falling
End
AliasConditionState = FREEFALL DYING
ConditionState = PARACHUTING
Animation = AIPFDR_SKL.AIPFDR_PHG
AnimationMode = LOOP
Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME
;our bone positions should come from the last frame, rather than the first
TransitionKey = TRANS_Chute
End
AliasConditionState = PARACHUTING DYING
TransitionState = TRANS_Falling TRANS_Chute
Animation = AIPFDR_SKL.AIPFDR_POP
AnimationMode = ONCE
Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME
;our bone positions should come from the last frame, rather than the first
End
TransitionState = TRANS_Chute TRANS_Standing
Animation = AIPFDR_SKL.AIPFDR_PTD
AnimationMode = ONCE
End
End
DisplayName = OBJECT:WhiteLightning
Side = Neko
EditorSorting = INFANTRY
TransportSlotCount = 1
WeaponSet
Conditions = None
Weapon = PRIMARY WhiteLightningSniperRifle
End
WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY WhiteLightningSniperRifle
Weapon = SECONDARY AWMSmokeGrenadeX
PreferredAgainst = SECONDARY NONE
End
ArmorSet
Conditions = None
Armor = HumanArmor
DamageFX = InfantryDamageFX
End
VisionRange = 200
ShroudClearingRange = 200
BuildCost = 740
BuildTime = 15.0
ExperienceValue = 25 25 25 25 ;Experience point value at each level
ExperienceRequired = 0 25 50 75 ;Experience points needed to gain each level
IsTrainable = Yes ;Can gain experience
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = NekoketsukeiInfantryWLSniperCommandSet
VoiceSelect = JapaneseSelect
VoiceMove = JapaneseMove
VoiceGuard = JapaneseMove
VoiceAttack = JapaneseAttack
SoundStealthOn = StealthOn
SoundStealthOff = StealthOff
VoiceFear = JapaneseHurt
VoiceTaskComplete = JapaneseCreated
UnitSpecificSounds
VoiceCreate = JapaneseCreated
VoiceSubdue = JapaneseAttack
VoiceGarrison = JapaneseMove
VoiceEnter = JapaneseMove
VoiceEnterHostile = JapaneseAttack
VoiceGetHealed = JapaneseHurt
End
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SALVAGER SCORE
Body = ActiveBody ModuleTag_02
MaxHealth = 90.0
InitialHealth = 90.0
End
Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = No
End
Behavior = CommandButtonHuntUpdate ModuleTag_04 ; allows use of command button hunt script with this unit.
End
Behavior = StealthUpdate ModuleTag_05
StealthDelay = 1500
StealthForbiddenConditions = USING_ABILITY ATTACKING
InnateStealth = Yes
OrderIdleEnemiesToAttackMeUponReveal = Yes
End
Behavior = ProductionUpdate ModuleTag_08
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End
Behavior = MaxHealthUpgrade ModuleTag_11
TriggeredBy = Upgrade_TabukArmor
AddMaxHealth = 45.0
ChangeType = ADD_CURRENT_HEALTH_TOO
End
Locomotor = SET_NORMAL BasicHumanLocomotor
Locomotor = SET_NORMAL_UPGRADED BasicSteroidsHumanLocomotor
Behavior = LocomotorSetUpgrade ModuleTag_12
TriggeredBy = Upgrade_InfantrySteroids
End
Behavior = PhysicsBehavior ModuleTag_14
Mass = 5.0
End
; Behavior = SquishCollide ModuleTag_15
; ;nothing
; End
Behavior = SlowDeathBehavior ModuleTag_Death01
DeathTypes = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
SinkDelay = 30000
SinkRate = 1.0 ; in Dist/Sec
DestructionDelay = 45000
FX = INITIAL FX_DieJapanese
OCL = INITIAL OCL_BloodFXAWM
End
Behavior = SlowDeathBehavior ModuleTag_Death02
DeathTypes = NONE +CRUSHED +SPLATTED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 1
OCL = INITIAL OCL_AWMGibbed
FX = INITIAL FX_GibbedFire
End
Behavior = SlowDeathBehavior ModuleTag_Death03A
DeathTypes = NONE +EXPLODED
SinkDelay = 30000
SinkRate = 1.0 ; in Dist/Sec
DestructionDelay = 45000
ProbabilityModifier = 50
FX = INITIAL FX_DieJapanese
FlingForce = 9
FlingForceVariance = 5
FlingPitch = 60
FlingPitchVariance = 10
End
Behavior = SlowDeathBehavior ModuleTag_Death03B
DeathTypes = NONE +EXPLODED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 1
ProbabilityModifier = 50
OCL = INITIAL OCL_AWMGibbed
FX = INITIAL FX_GibbedFire
End
Behavior = SlowDeathBehavior ModuleTag_Death04
DeathTypes = NONE +BURNED
DestructionDelay = 0
FX = INITIAL FX_DieJapanese
OCL = INITIAL OCL_FlamingInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death05
DeathTypes = NONE +POISONED
DestructionDelay = 0
FX = INITIAL FX_DieJapanese
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_DieJapanese
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_DieJapanese
OCL = INITIAL OCL_ToxicInfantryGamma
End
Behavior = PoisonedBehavior ModuleTag_16
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
Behavior = CommandSetUpgrade ModuleTag_USESMKGRD
TriggeredBy = Upgrade_SmokeGrenades
CommandSet = NekoketsukeiInfantryWLSniperCommandSetUP
End
Behavior = WeaponSetUpgrade ModuleTag_GETSMKGRD
TriggeredBy = Upgrade_SmokeGrenades
End
Behavior = AutoHealBehavior ModuleTag_17
HealingAmount = 5
HealingDelay = 2000 ; msec
TriggeredBy = Upgrade_MedPacks
End
Behavior = WeaponBonusUpgrade ModuleTag_18
TriggeredBy = Upgrade_Hollowpoint
End
Behavior = ObjectCreationUpgrade ModuleTag_XX
UpgradeObject = OCL_ClaymoreSpawn
TriggeredBy = Upgrade_Claymore
End
Behavior = ObjectCreationUpgrade ModuleTag_YY
UpgradeObject = OCL_ClaymoreRemove
TriggeredBy = Upgrade_Claymore
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
Scale = 0.86
End