 |
Forum Info
|
 |
Forum Members: 18,581
Total Threads: 8,669
Posts: 94,547
Administrators:
DeeZire, Redemption
There are currently 47 users online.
|
 |
Partner Links
|
 |
 |
Advertisements
|
 |
|
| Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here. |
07-21-2005, 03:36 PM
|
#1 (permalink)
|
|
Senior Member
Join Date: Jan 2004
Posts: 231
|
Making things cloak units around each other
I was looking into the GPS scrambler and found the code that makes units within a certain area cloaked. I then tried to test that on a civy house to see if it would work if a soldier approached the area and the house would cloak him. The house itself was cloaked and also the unit itself didn't cloak.
So my question is how do you make it so that the house in this example, doesn't get cloaked but cloaks all units, from every side around it?
|
|
|
07-21-2005, 04:59 PM
|
#2 (permalink)
|
|
Senior Member
Join Date: Apr 2005
Location: Gamers Heaven
Posts: 781
|
hmmmmm...i really dont know the answer to this question, but im guessing that maybe you may need some kind of stealth update take or condition state to notify that these units should be stealthed...thats the only clue i really have...
|
|
|
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.
|
|
|
|
07-22-2005, 08:57 AM
|
#4 (permalink)
|
|
Member
Join Date: Jan 2004
Location: philippines
Posts: 53
|
This code is very useful, kudos to whoever made this.
And now this opens some interesting possibilities, I wonder if there are more "grant type behaviors" that could be made into more interesting projectiles.
|
|
|
07-22-2005, 09:32 AM
|
#5 (permalink)
|
|
Senior Member
Join Date: Dec 2002
Location: Nod base
Posts: 172
|
woo my old code :lol:
btw,about this part:
Quote:
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
|
you don't need to do that,just edit the StealthUpdate line in \ini\default\object.ini
|
|
|
07-22-2005, 01:32 PM
|
#6 (permalink)
|
|
Member
Join Date: Jul 2005
Posts: 42
|
whow holy sh... 
|
|
|
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 06:25 PM.
|