edited April 2021 in ORK Support
Hey I have stacking enabled on my status effect but when I add it through code it doesn't stack?

user.Status.Effects.Add((1, user, null, true, false, user, new VariableHandler(false), new SelectedDataHandler());

Post edited by foxx on
  • Is your effect stackable Once Per Combatant or simply Enabled?
    If it's once per combatant, it'd require a different user combatant each time, as it's otherwise coming from the same combatant, preventing it from being added.

    Also, you can pass on null for the variable handler and selected data handler.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • It's simply enabled.
  • Change it to:
    user.Status.Effects.Add(1, user, null, true, false, null, new VariableHandler(false), new SelectedDataHandler());
    Or:
    user.Status.Effects.Add(1, user, null, true, false, null, null, null);

    The source parameter is usually null, unless it's coming from something that should not cause stacking, e.g. a grid formation or auto effect should only apply it once and not cause the stack to grow each time it's used.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.