If I remember correctly, the code that determines whether or not an object is a suitable target for a special power checks the special power's Enum value. Try making a new special power that uses the Hacker's disable building special power enum and using that as the special power for your disguise ability.
Originally Posted by: CommieDog
Well i tested some stuff and couldn't get it to work as the disguise stuff does, i think the disguise stuff is hardcoded or something or i'm just too stupid..:P
@tomeister
However you can use "DisguiseAsVehicle" for buildings if you add "VEHICLE" and "DISGUISER" to the KindOf and comment out "IMMOBILE", give the building an "AIUpdateInterface" module with a locomotor and a "PhysicsBehavior" module with a mass.
You can give the locomotor a tiny speed so you can move the building a bit so it fits nicely and doesn't overlap other buildings.
I don't know if you want to use it for your mod in which you use the moveable buildings, if so you already got a locomotor and mass i guess.
What's important is that the building you want to disguise as also has "VEHICLE" as KindOf defined, an "AIUpdateInterface" module with a locomotor and a "PhysicsBehavior" module with a mass.
Here's an example map.ini, took the Lazr_AmericaPowerPlant to test it.
Object Lazr_AmericaPowerPlant
KindOf = PRELOAD STRUCTURE SELECTABLE SCORE CAPTURABLE FS_POWER MP_COUNT_FOR_VICTORY VEHICLE DISGUISER ;IMMOBILE
AddModule
Behavior = AIUpdateInterface ModuleTag_Loco
End
End
Locomotor = SET_NORMAL NoMoveLocomotor ;made this for testing purposes, add locomotor of choice
AddModule
Behavior = PhysicsBehavior ModuleTag_Mass
Mass = 50.0
End
End
AddModule
Behavior = SpecialAbility ModuleTag_Dis01
SpecialPowerTemplate = SpecialAbilityDisguiseAsVehicle
UpdateModuleStartsAttack = Yes
; InitiateSound = BombTruckVoiceDisguise
End
End
AddModule
Behavior = SpecialAbilityUpdate ModuleTag_Dis02
SpecialPowerTemplate = SpecialAbilityDisguiseAsVehicle
StartAbilityRange = 1000000.0
ApproachRequiresLOS = No
End
End
AddModule
Behavior = StealthUpdate ModuleTag_Dis03
StealthDelay = 1
DisguisesAsTeam = Yes
RevealDistanceFromTarget = 100.0f
OrderIdleEnemiesToAttackMeUponReveal = Yes
DisguiseFX = FX_BombTruckDisguise
DisguiseRevealFX = FX_BombTruckDisguiseReveal
InnateStealth = Yes
DisguiseTransitionTime = 2000
DisguiseRevealTransitionTime = 1000
End
End
End
CommandSet Lazr_AmericaPowerPlantCommandSet
1 = Command_UpgradeAmericaAdvancedControlRods
2 = Command_DisguiseAsVehicle
14 = Command_Sell
End
I tested it in game and it works, disguised a powerplant into a supplydropzone.
Hope i was a bit of a help for you...
Greetz, acidbrain
Edited by user
13 years ago |
Reason: Not specified