07-21-2005, 06:19 PM
|
#3 (permalink)
|
|
Member
Join Date: Feb 2003
Location: USA
Posts: 55
|
I did not make this but I have used it and it works.
Quote:
some research on the making of stealth generator.
first,add these codes:
Object stealthgenobject
VisionRange = 0.0
EditorSorting = SYSTEM
Draw = W3DModelDraw ModuleTag_NOTREALLYADRAW
DefaultConditionState
Model = None
End
End
KindOf = NO_COLLIDE IMMOBILE UNATTACKABLE
Body = ImmortalBody ModuleTag_01
MaxHealth = 1
InitialHealth = 1
End
Behavior = GrantStealthBehavior ModuleTag_02
StartRadius = 200.0
FinalRadius = 200.0
RadiusGrowRate = 100.0
KindOf = VEHICLE INFANTRY
End
End
then copy any building's codes,and add:
Object stealthgenerator
......
Behavior = FireWeaponUpdate ModuleTag_xx
Weapon = stealthgenWeapon
End
......
End
and in Weapon.ini:
Weapon stealthgenWeapon
PrimaryDamage = 0
PrimaryDamageRadius = 0.0
AttackRange = 1.0
DamageType = ARMOR_PIERCING
DeathType = NORMAL
WeaponSpeed = 99999
ProjectileObject = stealthgenobject
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 250
ClipSize = 0
ClipReloadTime = 0
End
then,add these codes to all units that not stealth but can be stealthed by stealth generator:
Behavior = StealthUpdate ModuleTag_xx
StealthDelay = 999999999;make it stealth again very slowly
StealthForbiddenConditions = FIRING_PRIMARY TAKING_DAMAGE MOVING
FriendlyOpacityMin = 50.0%
FriendlyOpacityMax = 100.0%
InnateStealth = No
OrderIdleEnemiesToAttackMeUponReveal = Yes
MoveThresholdSpeed = 3
End
so,when these units enter into the effect area of the stealth generator,they will be stealthed.and when they move---like move out of the effect area---they will reveal themselves.but there is a problem:when the stealth generator be sold or destoryed,these stealthed units won't reveal themselves.so we fix it like this:
first,back to the codes of stealth generator,add:
Behavior = FireWeaponWhenDeadBehavior ModuleTag_xx
DeathWeapon = stealthdisableWeapon
StartsActive = Yes
End
Behavior = ObjectCreationUpgrade ModuleTag_xx
UpgradeObject = OCL_stealthdieDrone
TriggeredBy = Upgrade_AmericaBattleDrone
End
Behavior = GrantUpgradeCreate ModuleTag_xx
UpgradeToGrant = Upgrade_AmericaBattleDrone
End
Behavior = AIUpdateInterface ModuleTag_xx
End
add these codes into ObjectCreationList.ini
ObjectCreationList OCL_stealthdieDrone
CreateObject
Offset = X:0 Y:0 Z:1
ObjectNames = stealthdieDrone
IgnorePrimaryObstacle = Yes
Disposition = LIKE_EXISTING
Count = 1
RequiresLivePlayer = Yes
End
End
then add:
Object stealthdieDrone
Draw = W3DModelDraw ModuleTag_NOTREALLYADRAW
DefaultConditionState
Model = None
End
End
EditorSorting = SYSTEM
TransportSlotCount = 0 ;how many "slots" we take in a transport (0 == not transportable)
ArmorSet
Conditions = None
Armor = InvulnerableAllArmor
End
VisionRange = 0
ShroudClearingRange = 0
; RadarPriority = UNIT
KindOf = NO_COLLIDE UNATTACKABLE NO_SELECT
Body = ActiveBody ModuleTag_02
MaxHealth = 10000.0
InitialHealth = 10000.0
End
Behavior = AIUpdateInterface ModuleTag_03
End
Locomotor = SET_NORMAL DroneLocomotor
Behavior = PhysicsBehavior ModuleTag_05
Mass = 5000.0
KillWhenRestingOnGround = Yes
AllowBouncing = No
End
Behavior = SlavedUpdate ModuleTag_06
GuardMaxRange = 1
GuardWanderRange = 1
AttackRange = 1
AttackWanderRange = 1
ScoutRange = 1
ScoutWanderRange = 1
StayOnSameLayerAsMaster = Yes
End
Behavior = DestroyDie ModuleTag_08
DeathTypes = ALL
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_98
DeathWeapon = stealthdisableWeapon
StartsActive = Yes
End
Behavior = StealthUpdate ModuleTag_99
StealthDelay = 0 ; msec
StealthForbiddenConditions = NONE
InnateStealth = Yes
OrderIdleEnemiesToAttackMeUponReveal = No
End
Geometry = CYLINDER
GeometryMajorRadius = 5.0
GeometryMinorRadius = 6.0
GeometryHeight = 3.0
GeometryIsSmall = Yes
Shadow = SHADOW_VOLUME
ShadowSizeX = 89 ; minimum elevation angle above horizon. Used to limit shadow length
End
Weapon.ini again:
Weapon stealthdisableWeapon
PrimaryDamage = 0.001
PrimaryDamageRadius = 250.0
AttackRange = 1.0
DamageType = FLAME
DeathType = NORMAL
WeaponSpeed = 99999
RadiusDamageAffects = ALLIES
DelayBetweenShots = 50
ClipSize = 0
ClipReloadTime = 0
End
thus,when the stealth generator be sold or destoryed,these stealthed units will reveal themselves.
|
|
|
|