Ability Questions

Halp :v

So I've been playing with abilities, was wondering if there's a way to get an instant action to be triggered when an ability is. Would OnAbilityUsed do the trick?


Also, today I coded in an ability that prevents Phase Jumping, within the ability's radius, and I was wondering if it's at all possible to apply this buff to ships that are in Phase space (i.e. pull them out early)? I've set numSpaces to apply to Phase as well, but that doesn't appear to be working. As the spoiler tags don't seem to like covering long blocks of text, sorry for huge wall of text.

(From the "self" buff)

numPeriodicActions 1
periodicAction
    actionCountType "Infinite"
    actionIntervalTime
        Level:0 1.000000
        Level:1 1.000000
        Level:2 1.000000
    buffInstantActionType "ApplyBuffToTargetsInRadius"
    instantActionTriggerType "AlwaysPerform"
    buffType "BUFF_DESTABILIZEHYPERSPACETARGET"
    targetFilter
        numOwnerships 2
        ownership "Enemy"
        ownership "Friendly"
        numObjects 2
        object "Frigate"
        object "CapitalShip"
        numSpaces 2
        space "Normal"
        space "Phase"
        numConstraints 0
    range
        Level:0 10000.000000
        Level:1 0.000000
        Level:2 0.000000
    maxTargetCount
        Level:0 -1.000000
        Level:1 -1.000000
        Level:2 -1.000000
    effectInfo
        effectAttachInfo
            attachType "Invalid"
        smallEffectName ""
        largeEffectName ""
        soundID ""

(From the "target" buff)

numInstantActions 2
instantAction
    buffInstantActionType "PlayPersistantAttachedEffect"
    instantActionTriggerType "OnDelay"
    delayTime 0.000000
    effectInfo
        effectAttachInfo
            attachType "Above"
        smallEffectName "CapitalBuff_IonDisableSmall"
        largeEffectName "CapitalBuff_IonDisableLarge"
        soundID ""
instantAction
    buffInstantActionType "DoInterrupt"
    instantActionTriggerType "OnDelay"
    delayTime 0.000000
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 1
entityBoolModifier "DisablePhaseJump"
numFinishConditions 3
finishCondition
    finishConditionType "OutOfRange"
finishCondition
    finishConditionType "FirstSpawnerNoLongerHasBuff"
    buffTypeToQuery "BUFF_DESTABILIZEHYPERSPACESELF"
finishCondition
    finishConditionType "OwnerChanged"

 

 

3,799 views 4 replies
Reply #1 Top

well if it DID it would be too over powered, units would be stuck in transit for an hour or more on many maps. Also, you're applying the buff to your own ships, which might be less than ideal seeing as your finish condition is out of range... idk. All in all I think this one needs to go back to the drawing board for some fundamental logic changes. You DO make flow charts for abilities, right? But theoretically, yea, on ability used could work, but, the balance issu-blahblahblah. Once its in phase space its in IN, you'd only be able to make an ability to slow the ship down to sub-light speeds, at least, that is the conclusion I arrived at in the past. It wasn't worth the effort. Good luck though.

Reply #2 Top

The friendly bit's only in there for testing, and worked to that end, I realize that leaving it in would be utterly ridiculous. As for the early exit, it would only work once the ship hit's the ability's effect radius. The finish condition does it's intended job. Though it seems that this goal just can't happen, with the engine and other restrictions. The OnAbilityUsed bit is actually for another Ability, not the phase blocker one.

Reply #3 Top

You can not cancel hyperspace as far as I know, but you can slow down their speed, also it will be applied for any incoming target (you can use the normal targetFilter) no mather how far away they are. 

You can use the buffInstantActionType "ApplyBuffToIncomingHyperSpacers" , the applied buff should then have an "HyperSpaceSpeed" entity modifier.

Reply #4 Top

Nah, I'm not going to do that, as that wouldn't make sense in terms of Star Wars, which is the current use. I did note the HyperspaceSlow ability/buff, which is what made me realize the Jump canceler was possible. I'll upload a vid at some point, as a short demo of what it does (as it works and whatnot). Though ApplyBuffToIncomingHyperSpacers might work as a canceler as well. I'll try that if/when I get the time.