Reasource stealing ability

I’ve been trying to make an ability that gives me resources every time an enemy dies.

 

Here is my attempt at it.

I used the Developer program, so all the lines and such are correct.

 

Problem is, it never gives me any reasources. (crystal in this case)

 

 

TXT

entityType "Ability"

buffInstantActionType "ApplyBuffToTargetsInRadius"

instantActionTriggerType "AlwaysPerform"

buffType "BuffPlunder"

targetFilter

            numOwnerships 1

            ownership "Enemy"

            numObjects 3

            object "CapitalShip"

            object "Frigate"

            object "PlanetModule"

            numConstraints 0

range

            Level:0 8000.000000

            Level:1 8000.000000

            Level:2 8000.000000

maxTargetCount

            Level:0 -1.000000

            Level:1 -1.000000

            Level:2 -1.000000

effectInfo

            effectAttachInfo

                        attachType "Invalid"

            smallEffectName ""

            largeEffectName ""

            soundID ""

needsToFaceTarget FALSE

canCollideWithTarget TRUE

moveThruTarget FALSE

isUltimateAbility FALSE

maxNumLevels 1

levelSourceType "FixedLevel0"

aiUseTime "Invalid"

aiUseTargetCondition "Invalid"

isAutoCastAvailable FALSE

isAutoCastOnByDefault FALSE

pickRandomPlanetToExploreForAutoCastTarget FALSE

ignoreNonCombatShipsForAutoCastTarget TRUE

onlyAutoCastWhenDamageTakenExceedsPerc 0.000000

isPassive TRUE

researchPrerequisites

            NumResearchPrerequisites 0

nameStringID "IDS_ABILITY_TARGETINGUPLINK_NAME"

descStringID "IDS_ABILITY_TARGETINGUPLINK_DESCRIPTION"

hudIcon "HUDICON_ABILITY_TARGETINGUPLINK"

smallHudIcon "HUDICON_ABILITY_TARGETINGUPLINK"

infoCardIcon ""

 

TXT

entityType "Buff"

onReapplyDuplicateType "StackNewBuff"

buffExclusivityForAIType "NotExclusive"

isInterruptable TRUE

isChannelling TRUE

numInstantActions 2

instantAction

            buffInstantActionType "PlayAttachedEffect"

            instantActionTriggerType "OnDelay"

            delayTime 1.000000

            effectInfo

            effectAttachInfo

                                    attachType "Aura"

                        smallEffectName "Buff_CeaseFireSpawner"

                        largeEffectName "Buff_CeaseFireSpawner"

                        soundID "EFFECT_TELEKINETICPUSH"

instantAction

            buffInstantActionType "StealResources"

            instantActionTriggerType "OnOwnerDeath"

            resourceToSteal "Crystal"

            resourceAmount

                        Level:0 25.000000

                        Level:1 0.000000

                        Level:2 0.000000

numPeriodicActions 0

numOverTimeActions 0

numEntityModifiers 0

numEntityBoolModifiers 0

numFinishConditions 1

finishCondition

            finishConditionType "AllOnDelayInstantActionsDone"

 

does anyone have any ideas?

 

 

Also, I was working on a different ability.

And I got this error

 

Assert @ c:\gs\gamma\03\CodeSource\GS/Entity/Interfaces/IBuff.cpp(2032)

 

params.target != NULL

 

I was able to work around it, and the ability works now, but I am curious as to what it means

5,734 views 10 replies
Reply #1 Top
does anyone have any ideas?


I haven't played around with abilities for a long time, but I think your problem is the "OnOwnerDeath" trigger type.

I'm pretty sure Owner refers to the buff caster, not the buff target.

So the syntax correct, but it's waiting for the caster to die to give you resources, I think. But I could be wrong ;)
Reply #2 Top
urg, any way to get that ability to work?

is thier a "onTargetdeath"?
Reply #3 Top
Well, first you should probably check to see if that's the case.. try to self destruct the caster and see if it gives you the crystal, I guess :P
Reply #4 Top
lol, alright.
Reply #5 Top
I have tried it, and it didn't work.
Reply #6 Top
bump
Reply #7 Top
bump
Reply #8 Top
bump
Reply #9 Top
bump, again,

does ANYONE have an idea?

(even a "no" would help"
Reply #10 Top
There would probably be posts if they did.