That's a good idea pcteen1
Anyways, here's an option:
USPoliceCarWithHorn
;-------------------------------------------------------------------------------------------
; This part controls the replacement of the USPoliceCarWithHorn: We use OCL's and a suicide weapon to create USPoliceCarWithOutHorn
;-------------------------------------------------------------------------------------------
;creating the suicide weapon dummy
Behavior = ObjectCreationUpgrade ModuleTag_Replace01
TriggeredBy = [Set an upgrade that is called by CommandButton and which is either OBJECT or PLAYER based, since you might want that all police cars STFU in contrary to just one]
UpgradeObject = [This calles for an OCL object which has the FireWeaponWhenDead module which calles for a suicide weapon killing your "loud" police car. We use the deathtype EXTRA_2 and the damagetype PENALTY (both are unused in ZH) to prevent any problems with existing units. EXTRA_2 is set in CreateObjectDie and DestroyDie modules below. You might want to set PENALTY damage to 0% for any object that is NOT planned to be suicide killed. Check ARMOR.ini]
End
;activating the creation process
Behavior = ProductionUpdate ModuleTag_Replace02
End
;creating the silent police car
Behavior = CreateObjectDie ModuleTag_Replace03
DeathTypes = NONE +EXTRA_2 ;setting the EXTRA_2 deathtype
CreationList = [Add an OCL entry which calls for the USPoliceCarWithOutHorn]
TransferPreviousHealth = Yes ;pretty useful since you can replace a damaged police car without losing health info
End
Behavior = DestroyDie ModuleTag_Replace04
DeathTypes = NONE +EXTRA_2
End
; REMEMBER: Always check other DeathBehavoirs, DestroyDies, FXListDies and CreateObjectDies and make sure you set -EXTRA_2 in there to prevent your unit to play a FX when being killed by the suicide weapon
;-------------------------------------------------------------------------------------------
Set up a suicide weapon as well as the necessary OCL's and the SuicideDummyObject that fires the suicide weapon when killed. You should also add this to your DAMAGEFX.ini
MajorFX = PENALTY None
MinorFX = PENALTY None
This prevents any FX from being shown when your unit is killed by the suicide weapon. Of course you have to add this into the unit's armorset.
This might be a bit complicated but it works perfectly except for one flaw, you won't get any score info on that unit. Since it's ambient no one cares
