My previous post got no answer, and I deleted it to make another post with more info on what I mean.
So, I have a project, first person shooter with roguelike elements. I have base player character blueprint and childs of it, where I can override custom event to make character’s own abilities, such as energy shield, with all code for it in child blueprint, not base one.
Also I have gun system in place, I have base gun and it childs, all basic code in base gun, but shooting is in child blueprint, how it should shoot if it can.
Base character has 3 slots to pick up guns and switch between them, reload, shoot and etc.
Everything works great, but there is something bothers me for some time. I want to have attachable items for my characters and guns, than can be placed in available slots for them. They suppose to change stats of character and guns, like +firerate -accuracy, and I know how to make it.
BUT I don’t know how to make them do something like this: “When player killed enemy, restore 5% of health”
And this is the problem. I want those items to be not just upgrades to stats, but gameplay changers, that can fully change your playstyle.
Those are some examples from others games and how it works there.
Let it die (UE4) - you can attach decals to your character, and they will get (+20% armor if you wear fullset of SOME armor), or (Poison is not dealing damage, it heals you instead).
Nuclear throne (Gamemaker Studio) - Reaching new radiation level grants you mutations, such as (Explosions can down you only to 4 hp), or (When you die you revive with 1 health, recharges when you reach full hp).
I hope you understood what I mean, and problem is how2do it?
I have one idea in mind, but please share yours if you have any.
My idea is to make custom events in base character and gun, such as “Player got damaged”, and all of those events cast to similar events in those attached items. And than in every attached item if you need override it from parent and and write code what to do. Problem is, that I don’t know, is it going to eat a lot of performance or not?
I want to make this system only with blueprints and then convert them to c++.
Thank you if you read it all. I hope someone will help me.