Array of Classes - Set Default Values

Hi everybody,

I don’t know if I’ll be able to explain my situation very well, but I’ll try my best.

So, I have a blueprint named BP_BaseProjectile that contains the basic properties and functions needed to create various types of projectile like : piercing projectiles, explosive projectiles, bouncing projectiles, etc. Anyway, the only thing left do to on my BP_BaseProjectile is a properties array. Basically, that array will contains properties that defines even more my projectile like : fire damage, ice damage, burn ennemy, chill ennemy, heal caster, etc.

For now, the properties array is an array of BPS_Property (structure that contains the defining data of a property) that contains a variable named PropertyType of type BPE_Properties (enum of all property types) and a variable named PropertyValue of type float.

I have the data setup, that’s not a problem. The problem is that I can’t figure a clever way to take that data and apply it. Usually, I’ll make an interface named BPI_Property defining a function named ApplyProperty which would ask for the following parameters : PropertyInfo of type BPS_Property, PropertyTarget of type Actor and I would make a blueprint named BP_Property that implements BPI_Property. From my BP_BaseProjectile, for each property in my properties array, I would send the message ApplyProperty to BP_Property who would just apply the property. It looks like a great solution, but you can’t (as far I know) have an array of BP_Property and set it’s default values from the BP_BaseProjectile’s properties array in the Details panel.

My question is : “Does anyone have a solution to this ?”

Thanks !