I have been trying to make an ability where planets can be taken over through negotiation rather then bombardment. For this I have tried to use the ChangePlayerIndexToFirstSpawner instant action. However, to prevent this from being an overpowered ability I want to trigger this ability OnChance. So far this has not worked for me. This is my current set up in the BuffTarget entity:
TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeNewBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack FALSE
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable TRUE
isChannelling TRUE
numInstantActions 1
instantAction
buffInstantActionType "ChangePlayerIndexToFirstSpawner"
instantActionTriggerType "OnChance"
buffApplyChance
Level:0 0.300000
Level:1 0.400000
Level:2 0.500000
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
finishConditionType "TimeElapsed"
time
Level:0 1.000000
Level:1 1.000000
Level:2 1.000000
Changing the chance to 1.0000 makes no difference.
I'm also confused about the finish condition. I have tried OwnerChanged, OwnerIsFriendlyToFirstSpawner and TargetOwnerIsFriendly all to no avail.
BTW the ability works when I change the trigger to OnDelay with AllOnDelayInstantActionsDone as the finish condition.
Any help on this would be much appreciated!