Trying to wrap my head around the Selected Data nodes and need a little guidance if possible;

Let's say on my abilities I've added ability variables like (mod1, mod2, mod3) to my abilities that are Floats. How would I update my Damage Formula to take into account these variables?

I tried adding the Selected -> Selected Ability Node, but it wanted me to select what ability to use? I know my "Attack" Battle Event has the calculate step, do I need to do something extra there before the Calculate node?

Essentially what I'm trying to do is, before calculating damage, I need to check if certain ability variables are set (If mod3 is set then I don't want to check for mod2 etc etc) and then use those values in my calculations.

Thanks for any help!
  • Figured it out! For those who might've seen this post and wondered the same thing, here's what I did:

    First, on my ability under Ability Variables I added a new Game Variable and set it's options like:

    Value Type (Variable Key)
    Value

    Value (Variable Key)
    mod1

    Type
    Float

    Operator
    Set

    Value Type (Float Value)
    Value

    Value (Float Value)
    0.5


    Next, I added a new Formula called "Ability Modifier". Here are the steps/nodes:

    Formula Settings
    Set Initial value to 0, using "Value" as the Value Type.

    Next added this Node:
    Add > Value > Value

    Operator
    Add

    Value Type (Value)
    Game Variable

    Variable Key (Value)
    mod1

    Variable Origin (Value)
    Selected

    Value Type (Selected Key)
    Value

    THIS IS THE KEY STEP
    Value (Selected Key)
    action

    It seems like the "action" selected key is populated with the data from the ability that triggered the Event that calls this Formula.
  • Yep, the action selected key stores the ability/item that is being used, i.e. in battle events and formulas of an ability/item, you can always access it like that.
    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!
  • So freakin' cool!
Sign In or Register to comment.