Attach blueprint scripts to multiple actors
I wanted to ask about the possibility of attaching the same blueprint to several actors/pawns/characters. A problem that I have is that I have lots of enemies in a game that act pretty similar in most ways; that is that they try to move close to the player, they damage them, they take damage themselves, etc. But what I have done recently is duplicated the blueprint and created many enemies from it. However, if I want to modify its basic behaviour (say there is an improvement I can make to it that all of my enemies inherit, such as the way it deals damage; like adding knockback) I have to make this change in every single blueprint.
In unity, when I make a script, I can attach that script to every enemy. So if I make adjustments to that scripts it updates it on each enemy. Then I can add another script for unique behaviours and modify the variables for core things like movement speed and damage.
asked Oct 31 '17 at 04:57 PM in Blueprint Scripting
Look into blueprint components, they're most likely exactly what you're looking for:
You will want to get familiar with inheritance, too:
Combining both of the above will give you plenty of flexibility.
Follow this question
Once you sign in you will be able to subscribe for any updates here