Random item generation design pattern
I'm working on a (loot) game and want to generate random loots like in Diablo, POE, etc...
I'm currently struggling with the "good" design pattern to adopt to achieve this in blueprints, I almost get it working but I don't think my design choices are that good.
Here is what I've done so far:
So in my "GenerateLoot" function (from LIB_Loots) I do some stuff to "choose" the loot and then I get the "Blueprint Class" I have to create (BP_Weapon for exemple) and here my problem (for now)
Based on the class's name, I don't know how to Instantiate the objet (don't need to spawn it) I first look at "Create Object" node, but it seems to work only for blueprint inherited from Object class (and I read that you can't use a construct in it ? oO) and my blueprints are inheriting from Actor (here is maybe a mess to start with)
Then I tried to use "Spawn Actor From Class" node, but it seems that I can't use it in my "LIB_Loots" (blueprint function library), either in my Blueprint actors
To "solve" my problem I need Blueprints acting like Object (but with a construct, as I will generate the random attributes in it) but I don't know how to do it.
Finally, maybe my "setup" is in the wrong way (and that's ok), if so do you have any suggestion ?
Thank you for reading !
asked Jul 22 '16 at 03:17 PM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here