 |
Forum Info
|
 |
Forum Members: 18,677
Total Threads: 8,798
Posts: 95,842
Administrators:
DeeZire, Redemption
There are currently 30 users online.
|
 |
Partner Links
|
 |
 |
Advertisements
|
 |
|
| Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here. |
03-12-2006, 12:28 PM
|
#1 (permalink)
|
|
Senior Member
Join Date: Aug 2003
Posts: 109
|
Enabling Early Base Alerts
Using the EnemyNear idea, I can't seem to get this to work with my AmericaBunker.
I added this:
UnitSpecificSounds
UnderConstruction = UnderConstructionLoop
VoiceMeetEnemy = AirRaidSiren
End
and this ...
Behavior = EnemyNearUpdate ModuleTag_11
End
What am I missing?
- Colton
|
|
|
03-12-2006, 09:31 PM
|
#2 (permalink)
|
|
Senior Member
Join Date: Oct 2004
Location: Alaska (Hell Frozen Over)
Posts: 383
|
You might need to add an AI module to that object.
|
|
|
03-13-2006, 03:20 AM
|
#3 (permalink)
|
|
Senior Member
Join Date: Aug 2004
Location: Philippines
Posts: 452
|
well the thing works for me...loook at this infantry code maybe this will help xD
Code:
Object AmericaInfantryMarine
SelectPortrait = Rank_Private_USA
ButtonImage = Rank_Private_USA
UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
UpgradeCameo2 = Upgrade_InfantryCaptureBuilding
UpgradeCameo3 = Upgrade_AmericaChemicalSuits
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
IgnoreConditionStates = PREATTACK_A FIRING_A BETWEEN_FIRING_SHOTS_A RELOADING_A
DefaultConditionState
Model = AIMRN_SKN
IdleAnimation = AIRngr_SKL.AIRngr_STA 0 35
IdleAnimation = AIRngr_SKL.AIRngr_IDA
IdleAnimation = AIRngr_SKL.AIRngr_IDB
AnimationMode = ONCE
WeaponFireFXBone = PRIMARY Muzzle
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponFireFXBone = SECONDARY Muzzle
WeaponLaunchBone = SECONDARY Muzzle
TransitionKey = TRANS_Stand
End
ConditionState = REALLYDAMAGED
IdleAnimation = AIRngr_SKL.AIRngr_STB 0 35
IdleAnimation = AIRngr_SKL.AIRngr_IDC
IdleAnimation = AIRngr_SKL.AIRngr_IDD
AnimationMode = ONCE
TransitionKey = TRANS_StandInjured
End
TransitionState = TRANS_Stand TRANS_StandInjured
Animation = AIRngr_SKL.AIRngr_SA2SB
AnimationMode = ONCE
End
ConditionState = USING_WEAPON_A
Animation = AIRngr_SKL.AIRngr_ATA
AnimationMode = LOOP
TransitionKey = TRANS_FiringA
End
ConditionState = USING_WEAPON_A REALLYDAMAGED
Animation = AIRngr_SKL.AIRngr_ATA2
AnimationMode = LOOP
TransitionKey = TRANS_FiringAInjured
End
TransitionState = TRANS_FiringA TRANS_FiringAInjured
Animation = AIRngr_SKL.AIRngr_A2WAA
AnimationMode = ONCE
End
TransitionState = TRANS_Stand TRANS_FiringA
Animation = AIRngr_SKL.AIRngr_ATAST
AnimationMode = ONCE
AnimationSpeedFactorRange = 4 4
End
TransitionState = TRANS_FiringA TRANS_Stand
Animation = AIRngr_SKL.AIRngr_ATAED
AnimationMode = ONCE
AnimationSpeedFactorRange = 4 4
End
TransitionState = TRANS_StandInjured TRANS_FiringAInjured
Animation = AIRngr_SKL.AIRngr_S2WAA
AnimationMode = ONCE
AnimationSpeedFactorRange = 4 4
End
TransitionState = TRANS_FiringAInjured TRANS_StandInjured
Animation = AIRngr_SKL.AIRngr_WAA2S
AnimationMode = ONCE
AnimationSpeedFactorRange = 4 4
End
TransitionState = TRANS_Stand TRANS_Move
Animation = AIRngr_SKL.AIRngr_STA2RNA
AnimationMode = ONCE
End
ConditionState = PREATTACK_B
Animation = AIRngr_SKL.AIRngr_ATBA
AnimationMode = ONCE
TransitionKey = TRANS_FiringB
End
AliasConditionState = PREATTACK_B MOVING
AliasConditionState = PREATTACK_B FIRING_B
AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B
ConditionState = FIRING_B
Animation = AIRngr_SKL.AIRngr_ATBB
AnimationMode = ONCE
TransitionKey = TRANS_FiringB
End
ConditionState = BETWEEN_FIRING_SHOTS_B
Animation = AIRngr_SKL.AIRngr_ATBB
AnimationMode = MANUAL
Flags = START_FRAME_LAST
TransitionKey = TRANS_FiringB
WaitForStateToFinishIfPossible = TRANS_FiringB
End
AliasConditionState = RELOADING_B
TransitionState = TRANS_Stand TRANS_FiringB
Animation = AIRngr_SKL.AIRngr_ATBST1
AnimationMode = ONCE
End
TransitionState = TRANS_FiringB TRANS_Stand
Animation = AIRngr_SKL.AIRngr_ATBST2
AnimationMode = ONCE
End
ConditionState = PREATTACK_B REALLYDAMAGED
Animation = AIRngr_SKL.AIRngr_ATB2A
AnimationMode = ONCE
TransitionKey = TRANS_FiringBInjured
End
AliasConditionState = PREATTACK_B MOVING REALLYDAMAGED
AliasConditionState = PREATTACK_B FIRING_B REALLYDAMAGED
AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B REALLYDAMAGED
ConditionState = FIRING_B REALLYDAMAGED
Animation = AIRngr_SKL.AIRngr_ATB2B
AnimationMode = ONCE
TransitionKey = TRANS_FiringBInjured
End
ConditionState = BETWEEN_FIRING_SHOTS_B REALLYDAMAGED
Animation = AIRngr_SKL.AIRngr_ATB2B
AnimationMode = MANUAL
Flags = START_FRAME_LAST
TransitionKey = TRANS_FiringBInjured
WaitForStateToFinishIfPossible = TRANS_FiringBInjured
End
AliasConditionState = RELOADING_B REALLYDAMAGED
TransitionState = TRANS_StandInjured TRANS_FiringBInjured
Animation = AIRngr_SKL.AIRngr_ATB2ST1
AnimationMode = ONCE
End
TransitionState = TRANS_FiringBInjured TRANS_StandInjured
Animation = AIRngr_SKL.AIRngr_ATB2ST2
AnimationMode = ONCE
End
TransitionState = TRANS_FiringA TRANS_FiringB
Animation = AIRngr_SKL.AIRngr_ATA2AB
AnimationMode = ONCE
AnimationSpeedFactorRange = 4 4
End
TransitionState = TRANS_FiringB TRANS_FiringA
Animation = AIRngr_SKL.AIRngr_ATA2AB
AnimationMode = ONCE_BACKWARDS
AnimationSpeedFactorRange = 4 4
End
ConditionState = MOVING
Animation = AIRngr_SKL.AIRngr_RNA 30
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = TRANS_Move
ParticleSysBone = None InfantryDustTrails
End
AliasConditionState = MOVING ATTACKING
ConditionState = MOVING REALLYDAMAGED
Animation = AIRngr_SKL.AIRngr_RNB 30
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = TRANS_Move
End
AliasConditionState = MOVING REALLYDAMAGED ATTACKING
ConditionState = DYING
Animation = AIRngr_SKL.AIRngr_DTA
Animation = AIRngr_SKL.AIRngr_DTB
AnimationMode = ONCE
TransitionKey = None
End
TransitionState = TRANS_Dying TRANS_Flailing
Animation = AIRngr_SKL.AIRngr_ADTF1
AnimationMode = ONCE
End
ConditionState = DYING EXPLODED_FLAILING
Animation = AIRngr_SKL.AIRngr_ADTF2
AnimationMode = LOOP
TransitionKey = TRANS_Flailing
End
ConditionState = DYING EXPLODED_BOUNCING
Animation = AIRngr_SKL.AIRngr_ADTF3
AnimationMode = ONCE
TransitionKey = None
End
AliasConditionState = DYING SPLATTED
ConditionState = SPECIAL_CHEERING
Animation = AIRngr_SKL.AIRngr_CHA
AnimationMode = LOOP
End
ConditionState = SPECIAL_CHEERING REALLYDAMAGED
Animation = AIRngr_SKL.AIRngr_CHB
AnimationMode = LOOP
End
ConditionState = FREEFALL
Animation = AIRngr_SKL.AIRngr_PFL
AnimationMode = LOOP
TransitionKey = TRANS_Falling
End
AliasConditionState = FREEFALL REALLYDAMAGED
AliasConditionState = FREEFALL DYING
ConditionState = PARACHUTING
Animation = AIRngr_SKL.AIRngr_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 REALLYDAMAGED
AliasConditionState = PARACHUTING DYING
TransitionState = TRANS_Falling TRANS_Chute
Animation = AIRngr_SKL.AIRngr_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_Stand
Animation = AIRngr_SKL.AIRngr_PTD
AnimationMode = ONCE
End
TransitionState = TRANS_Chute TRANS_StandInjured
Animation = AIRngr_SKL.AIRngr_PTD
AnimationMode = ONCE
End
ConditionState = UNPACKING
Model = AIRngr_F_SKN
Animation = AIRngr_F_SKL.AIRngr_F_FDP1
AnimationMode = ONCE
End
AliasConditionState = UNPACKING REALLYDAMAGED
ConditionState = RAISING_FLAG
Model = AIRngr_F_SKN
Animation = AIRngr_F_SKL.AIRngr_F_FDP2
AnimationMode = ONCE
TransitionKey = TRANS_Raising
End
AliasConditionState = RAISING_FLAG REALLYDAMAGED
ConditionState = PACKING
Model = AIRngr_F_SKN
Animation = AIRngr_F_SKL.AIRngr_F_FDP1
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_LAST
TransitionKey = TRANS_Packing
End
AliasConditionState = PACKING REALLYDAMAGED
TransitionState = TRANS_Raising TRANS_Packing
Model = AIRngr_F_SKN
Animation = AIRngr_F_SKL.AIRngr_F_FDP2
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_LAST
End
ConditionState = RAPPELLING
Animation = AIRngr_SKL.AIRngr_RPL1 ;30
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = TRANS_Rappelling
End
AliasConditionState = MOVING RAPPELLING
TransitionState = TRANS_Rappelling TRANS_Stand
Animation = AIRngr_SKL.AIRngr_RPL2
AnimationMode = ONCE
End
TransitionState = TRANS_Rappelling TRANS_StandInjured
Animation = AIRngr_SKL.AIRngr_RPL2
AnimationMode = ONCE
End
;----------------------
;start enemy near stuff
;----------------------
ConditionState = ENEMYNEAR
Animation = AIRngr_SKL.AIRNGR_CAP
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = TRANS_EnemyNear
End
ConditionState = ENEMYNEAR REALLYDAMAGED
Animation = AIRngr_SKL.AIRNGR_CAPB 0 35
AnimationMode = LOOP
TransitionKey = TRANS_EnemyNearInjured
Flags = RANDOMSTART
End
TransitionState = TRANS_EnemyNear TRANS_EnemyNearInjured
Animation = AIRngr_SKL.AIRNGR_CAPB
AnimationMode = ONCE
End
;----------------------
;end enemy near stuff
;----------------------
End
; ***DESIGN parameters ***
DisplayName = OBJECT:Marine
Side = America
EditorSorting = INFANTRY
TransportSlotCount = 1 ;how many "slots" we take in a transport (0 == not transportable)
WeaponSet
Conditions = None
Weapon = PRIMARY MarineM4CarbineWeapon
End
;WeaponSet
; Conditions = VETERAN
; Weapon = PRIMARY NeedsNewWeapon
;End
;WeaponSet
; Conditions = ELITE
; Weapon = PRIMARY NeedsNewWeapon
;End
;WeaponSet
; Conditions = HERO
; Weapon = PRIMARY NeedsNewWeapon
;End
ArmorSet
Conditions = None
Armor = HumanArmor
DamageFX = InfantryDamageFX
End
ArmorSet
Conditions = PLAYER_UPGRADE
Armor = ChemSuitHumanArmor
DamageFX = None
End
VisionRange = 200
ShroudClearingRange = 200 ;300
Prerequisites
End
BuildCost = 300 ;how much do i cost to train me?
BuildTime = 6.0 ;in seconds
ExperienceValue = 20 20 40 60 ;Experience point value at each level
ExperienceRequired = 0 40 60 120 ;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 = AmericaInfantryMarineCommandSet
; *** AUDIO Parameters ***
VoiceSelect = RangerVoiceSelect
VoiceMove = RangerVoiceMove
VoiceGuard = RangerVoiceMove
VoiceAttack = RangerVoiceAttack
VoiceFear = RangerVoiceFear
VoiceTaskComplete = RangerVoiceCaptureComplete
UnitSpecificSounds
VoiceEnter = RangerVoiceMove
VoiceEnterHostile = RangerVoiceAttack
VoiceMeetEnemy = RangerVoiceFear
VoiceGarrison = RangerVoiceGarrison
VoiceCreate = RangerVoiceCreate
VoiceSubdue = RangerVoiceSubdue
VoiceClearBuilding = RangerVoiceClearBuilding
VoiceGetHealed = RangerVoiceFear
End
UnitSpecificFX
CombatDropKillFX = FX_RangerCombatDropKill
End
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS CAN_RAPPEL SCORE INFANTRY
Behavior = CommandButtonHuntUpdate ModuleTag_02
End
Body = ActiveBody ModuleTag_03
MaxHealth = 355.0
InitialHealth = 355.0
End
Behavior = ExperienceScalarUpgrade ModuleTag_04
TriggeredBy = Upgrade_AmericaAdvancedTraining
AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
End
Behavior = AutoFindHealingUpdate ModuleTag_05
ScanRate = 1000 ; once a second.
ScanRange = 300 ;
NeverHeal = 0.85 ; don't heal if we are > 85% healthy.
AlwaysHeal = 0.25 ; if we get below 25%, find healing right away.
End
Behavior = AIUpdateInterface ModuleTag_0121
AutoAcquireEnemiesWhenIdle = Yes
End
Locomotor = SET_NORMAL BasicHumanLocomotor
Behavior = PhysicsBehavior ModuleTag_07
Mass = 5.0
End
Behavior = CommandButtonHuntUpdate ModuleTag_09 ; allows use of command button hunt script with this unit.
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_RangerDie
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_RangerDie
FlingForce = 8
FlingForceVariance = 3
FlingPitch = 60
FlingPitchVariance = 10
End
Behavior = SlowDeathBehavior ModuleTag_Death04
DeathTypes = NONE +BURNED
DestructionDelay = 0
FX = INITIAL FX_DieByFireUSA
OCL = INITIAL OCL_FlamingInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death05
DeathTypes = NONE +POISONED
DestructionDelay = 0
FX = INITIAL FX_DieByToxinUSA
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_DieByToxinUSA
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_DieByToxinUSA
OCL = INITIAL OCL_ToxicInfantryGamma
End
; --- end Death modules ---
Behavior = SquishCollide ModuleTag_12
End
Behavior = ArmorUpgrade ModuleTag_Armor01
TriggeredBy = Upgrade_AmericaChemicalSuits
End
Behavior = PoisonedBehavior ModuleTag_17
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 = SpecialAbility ModuleTag_18
SpecialPowerTemplate = SpecialAbilityRangerCaptureBuilding
UpdateModuleStartsAttack = Yes
StartsPaused = Yes ; Unpaused by upgrade module
InitiateSound = RangerVoiceCapture
End
Behavior = SpecialAbilityUpdate ModuleTag_19
SpecialPowerTemplate = SpecialAbilityRangerCaptureBuilding
StartAbilityRange = 5.0
UnpackTime = 3000 ; (changing this will scale anim speed)
PreparationTime = 20000 ; time to complete hack once prepared (changing this will scale anim speed)
PackTime = 2000 ; (changing this will scale anim speed)
DoCaptureFX = Yes
AwardXPForTriggering = 15
End
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_20
SpecialPowerTemplate = SpecialAbilityRangerCaptureBuilding
TriggeredBy = Upgrade_InfantryCaptureBuilding
End
Behavior = EnemyNearUpdate ModuleTag_21
End
Geometry = CYLINDER
GeometryMajorRadius = 7.0
GeometryMinorRadius = 7.0
GeometryHeight = 13.0
GeometryIsSmall = Yes
Shadow = SHADOW_DECAL
ShadowSizeX = 15;
ShadowSizeY = 15;
ShadowTexture = ShadowI;
BuildCompletion = APPEARS_AT_RALLY_POINT
Scale = 0.95
End
|
|
|
03-13-2006, 06:18 AM
|
#4 (permalink)
|
|
Senior Member
Join Date: Aug 2003
Posts: 109
|
Ah! The condition states ... didn't have that. Thanks, IPR!
Hmm. When I add the Condition state - ZH crashes. :tard:
;----------------------
;start enemy near stuff
;----------------------
ConditionState = ENEMYNEAR
Animation = AIRngr_SKL.AIRNGR_CAP
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = TRANS_EnemyNear
End
ConditionState = ENEMYNEAR REALLYDAMAGED
Animation = AIRngr_SKL.AIRNGR_CAPB 0 35
AnimationMode = LOOP
TransitionKey = TRANS_EnemyNearInjured
Flags = RANDOMSTART
End
TransitionState = TRANS_EnemyNear TRANS_EnemyNearInjured
Animation = AIRngr_SKL.AIRNGR_CAPB
AnimationMode = ONCE
End
;----------------------
;end enemy near stuff
;----------------------
- Colton
|
|
|
03-13-2006, 12:31 PM
|
#5 (permalink)
|
|
Senior Member
Join Date: Jun 2003
Location: Germany
Posts: 363
|
specify a model for the ConditionStates.
|
|
|
03-13-2006, 03:00 PM
|
#6 (permalink)
|
|
Senior Member
Join Date: Aug 2003
Posts: 109
|
Thanks, Dibelius. So, if I'm using the civilian bunker (America Bunker) - I need to use the bunker SKL instead of Ranger? Right?
- Colton
|
|
|
03-13-2006, 03:43 PM
|
#7 (permalink)
|
|
Senior Member
Join Date: Jun 2003
Location: Germany
Posts: 363
|
bunker SKL ? :tard:
what do you mean with that?
|
|
|
03-13-2006, 04:50 PM
|
#8 (permalink)
|
|
Senior Member
Join Date: Aug 2003
Posts: 109
|
Well, that's the thing. The bunker is going to be used as a "watchtower", but it doesn't have SKL ... is this going to be a problem?
- Colton
|
|
|
03-13-2006, 06:04 PM
|
#9 (permalink)
|
|
Senior Member
Join Date: Jun 2003
Location: Germany
Posts: 363
|
hm do you mean "skeleton"?
If yes this doesn't matter. that is only used for implementing the animations of the w3d file.
|
|
|
03-13-2006, 06:12 PM
|
#10 (permalink)
|
|
Senior Member
Join Date: Aug 2003
Posts: 109
|
I apologize, but I'm still confused. As I was saying, I'm going to use an AmericaBunker (civilian bunker) that alerts when enemy is spotted. I've tried using just:
ConditionState = ENEMYNEAR
End
I don't think that will work as ZH crashes with it. What would be the correct method of implementing the EnemyNear with a building object? Sorry if I'm not understanding the resolve.
- Colton
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 08:31 PM.
|