So far most of the tutorials I have watched for death systems deal with making a trigger and creating an ‘On Actor Begin Overlap’ blueprint sequence. This is all well and good but is specific to the object involved, is there any way I can create a general ‘death’ blueprint I can attach to any hazard whatsoever? I am using death systems as an example here but of course it could apply to other things as well, is there any way to create object properties without specifying an object?
its all dependent on what your looking to accomplish but the short answer is yes you can totally do that.
also your looking to just have a player death you could have a event for death on the player character an just call it from the different hazards.
Thanks for the answer, if you have time could you tell me how to do it?
(The first thing)
without knowing your exact goal its hard to tell you exactly what to do but ill post a example of a movement component i made and post a link to a tutorial for child actor components.
the picture is a very basic script in a child actor component to move the pawn its attached to to a random location. i can take this actor and just iattach it to any pawn and that pawn will begin roaming.
[Unreal Tutorial][2]
Okay so the way to do it is to make a custom event. Thanks.
Sounds like you want to look at inheritence and perhaps polymorphism.
This basically means you can create a class or blueprint (call this MyHazard) which will be your parent. Then when you click to create a new blueprint (MyHazard_Child), you get a list of class’ that you can choose from. In here, choose MyHazard, which will then create a child blueprint. You can keep creating as many children as possible.
Any functions or events you create in your Parent blueprint (MyHazard) will then be avaiable in all the children. This means you ony need to add the functionality in the single place of the parent, and all children will also run through the same code due to them inheriting it’s properties and functionality. (I think blueprint functions and events are virtual by default).
no thats not what im meaning to say. the bp_movement_roam is its own self contained object that can be attached to any pawn. its a form of modular object oriented design.