Making an ability able to toggle on and off

can anyone help me? i am trying to make the adaptive shield ability able to be toggled on or off/ I would set it up so that while it was on, it would use x antimatter a second until antimatter is depleted, of i turn the ability off. I get a generl idea of what abilities and buffs are, and i can alter them with ease, but this is a major change i do not know how to do. can anyone take some time to help me out? Thanks!

6,614 views 7 replies
Reply #1 Top

Try looking at the Gardian's repulse ability. I think that is similar to what you want.

Reply #2 Top

Not really... You could find the ability that slowly drains AM and use that and then you could just use the special ability of Sentinels and the Vasari lf...

Reply #3 Top

I am using something like that for my mod for Siege Frigates at the moment - they enter Siege Mode with special cons such as immobility and antimatter drain and pros like bombing cooldown and can exit it again. I'll look at it when I get home from work but it's quite simple really.

But for a quick look check out AbilityChargedMissiles.entity related to Vasari LRFs.

Reply #4 Top

Yeah and then use the Guardians shield ability for the AM drain...

Reply #5 Top

hmmmm... now that sounds interesting... :)  I'm not trying anything like this, but sounds like a neat thing to try.

-Teal

 

Reply #6 Top

Here's how I did it:

Ability file:

TXT
entityType "Ability"
buffInstantActionType "ApplyOrRemoveBuffToSelf"

instantActionTriggerType "AlwaysPerform"
buffType "BuffFrigateSiegeMode"
effectInfo
    effectAttachInfo
        attachType "Center"
    smallEffectName "Ability_FrigateSiegeMode"
    largeEffectName "Ability_FrigateSiegeMode"
    soundID "EFFECT_SiegeMode"
toggleStateOnNameStringID "IDS_ABILITY_SIEGEMODEACTIVE_NAME"
toggleStateOnDescStringID "IDS_ABILITY_SIEGEMODEACTIVE_DESCRIPTION"
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "OnlyWhenBombing"
aiUseTargetCondition "Any"
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "AntiMatter"
antiMatterCost
    Level:0 0.000000
    Level:1 0.000000
    Level:2 0.000000
cooldownTime
    Level:0 20.000000
    Level:1 0.000000
    Level:2 0.000000
orderAcknowledgementType "ONGENERALORDERISSUED"
researchPrerequisites
    NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_SIEGEMODE_NAME"
descStringID "IDS_ABILITY_SIEGEMODE_DESCRIPTION"
hudIcon "HUDICON_ABILITY_CHARGEDMISSILES"
smallHudIcon "HUDICON_ABILITY_CHARGEDMISSILES"
infoCardIcon ""

Buff file:

TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeNewBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack FALSE
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 0
numPeriodicActions 0
numOverTimeActions 1
overTimeAction
    buffOverTimeActionType "DrainAntiMatter"
    drainAntiMatterRate
        Level:0 5.000000
        Level:1 5.000000
        Level:2 5.000000
numEntityModifiers 3
entityModifier
    buffEntityModifierType "PlanetBombingCooldown"
    value
        Level:0 -5.000000
        Level:1 0.000000
        Level:2 0.00000
entityModifier
    buffEntityModifierType "ArmorAsDamageTarget"
    value
        Level:0 -15.000000
        Level:1 0.000000
        Level:2 0.000000
entityModifier
    buffEntityModifierType "ShieldMitigation"
    value
        Level:0 -0.600000
        Level:1 0.000000
        Level:2 0.000000
numEntityBoolModifiers 1
entityBoolModifier "DisableLinearEngines"
numFinishConditions 2
finishCondition
    finishConditionType "AntiMatterDepleted"
finishCondition
    finishConditionType "OwnerChanged"

 

---

I have highlighted the important parts. That's basically that is to it.

 

Reply #7 Top

Cool, thanks a lot!