What I mean is, you had a certain enemy with certain colors and a look identifying that enemy. You might fight that same one half a dozen times in one map. For the sake of argument lets say this character’s name is “Ralph”.
Would it on the coding side have been like Ralph00, Ralph 01, Ralph02 etc etc…? Or was it as simple as drag and drop so to speak as many of these characters in an area as needed?
So in Unreal the way I see it is either an NPC is dragged and dropped into a level, OR they are directly spawned when needed.
What do I need to keep in mind then if I wanted to make one NPC blueprint but either direct spawn or drag n drop them in?
OR
Do you think they all need to be individual even though they are the same character?
I imagine there would be things about both…one being more extensive but allowing more control, one obviously being a lot more easier.
There’s not really a ton to discuss here- the answer to your question of either/or is actually both. Inheritance is the name of the game here.
Each “Ralph” would be the same blueprint- I’ve seen the code for things like Golden Axe and such. Especially back in those days, it would have been VERY time consuming to make each enemy their own entity. So “Ralph” is a class.
Let’s do an exercise. Now “Ralph” could have a child, “Steve”. Steve is blue instead of red, and adds 1 damage to his attacks and takes 3 more damage to defeat.
Steve’s parent is Ralph, requiring only a sprite color swap and 2 variable changes to make an entirely new class. Ralph’s parent could be “Enemy”. Then before that “Pawn”, then “Actor”, then “Object”.
Ralph could also have siblings who share the same parent “Enemy”, such as the hammer wielding Olivia, the chain ganger Jim, and the big boy Terry. And they could all have their own children, too.
But as far as copies of the same enemy, you just spawn in a new Actor of that specific Class, and when it is spawned it is assigned an ID on the name such as “Ralph_01”, “Ralph_02”, and “Ralph_03” so they all remain individuals. If you change the enemy AT ALL you make a child and give it a new name.
This has been how things are done since the arcades. The exception would be copy-pasting them and changing small amounts of values instead of inheritance, but it doesn’t change the way they are/were spawned.