To make it short, I want to make a Hades-like skill tree. Each skill affects a specific variable in the game, sometimes it’s a int, sometimes a bool, sometimes a float… you get the idea.
To avoid having a long list of useless variables, I’m tring to use a “InstancedStruct” variable instead.
But then, when I do a “Get Instanced Struct Value”… impossible to get the value. I can’t connect anything to it, I can’t break it… it always returns “not valid”. I know the function is getting the right data, and I know this is a float. I just can’t manage to connect it to my next function.
you have to know the struct type when you GetInstancedStructValue. (you can do this by pulling off and using break struct or connecting it to a valid struct type)
so in your Event DungeonLost, it must expect a specific struct, lets say your float struct from your example.
any array of InstancedStruct called Variable isnt useful because you dont know what the variable is (or if you do you dont need InstancedStruct)
what i do is have a struct/Map with (GameplayTag, FinstancedStruct) the tag defines the type ie float and then you can switch and retrieve it
yep but what i mean is the function needs to know what the value is, so in this case float struct.
so if all you variables are floats you dont need instanced struct, if they have different things then you need a way to ID them. ie use a TMap of GameplayTag/InstancedStruct for you variables and then can get
Variable.Damage → float
Variable.Description → FText
etc
but yes it does need to be a struct but as a tip, Vectors are structs, GameplayTags are struct so some data you can just pass though