Adding a passive selfdestruction ability to capital ship
Hello,
i'm currently trying to add a selfdestruct effect (like starbase) as a passive ability to all capital ship. I've used the selfdestruct ability and buff of the starbase like that:
TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToSelf"
instantActionTriggerType "AlwaysPerform"
buffType "BuffSelfDestructSelfCapital"
effectInfo
effectAttachInfo
attachType "Invalid"
smallEffectName ""
largeEffectName ""
soundID "EFFECT_LASTRESORT"
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "Intrinsic"
aiUseTime "OnlyWhenAboutToDie"
aiUseTargetCondition "Any"
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.990000
useCostType "Passive"
researchPrerequisites
NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_SELFDESTRUCT_NAME"
descStringID "IDS_ABILITY_SELFDESTRUCT_DESCRIPTION"
hudIcon "HUDICON_ABILITY_SELFDESTRUCT"
smallHudIcon "HUDICON_ABILITY_SELFDESTRUCT"
infoCardIcon ""
And the buff :
TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeNewBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack FALSE
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 3
instantAction
buffInstantActionType "PlayAttachedEffect"
instantActionTriggerType "OnDelay"
delayTime 0.000000
effectInfo
effectAttachInfo
attachType "Center"
smallEffectName "Explosion_TechStarbase"
largeEffectName "Explosion_TechStarbase"
soundID ""
instantAction
buffInstantActionType "MakeDead"
instantActionTriggerType "OnDelay"
delayTime 3.000000
instantAction
buffInstantActionType "ApplyBuffToTargetsInRadiusWithTravel"
instantActionTriggerType "OnDelay"
delayTime 3.000000
buffType "BuffSelfDestructTarget"
targetFilter
numOwnerships 2
ownership "Friendly"
ownership "Enemy"
numObjects 4
object "CapitalShip"
object "Frigate"
object "PlanetModule"
object "StarBase"
numSpaces 1
space "Normal"
numConstraints 0
range
Level:0 12000.000000
Level:1 12000.000000
Level:2 0.000000
maxTargetCount
Level:0 -1.000000
Level:1 -1.000000
Level:2 -1.000000
effectInfo
effectAttachInfo
attachType "Center"
smallEffectName "Buff_CannonShellPhaseImpactWave"
largeEffectName "Buff_CannonShellPhaseImpactWave"
soundID ""
travelSpeed 500.000000
effectStaggerDelay 0.000000
hasWeaponEffects FALSE
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
finishConditionType "AllOnDelayInstantActionsDone"
Naturaly i've added a 4th ability in a capital ship ability:4 "AbilitySelfDestructCapital" but unhappily the game crash on launch. Is anyone can help me a little bit?
Thanks a lot!
