Add force to multiple blueprint actors/pawns on trigger overlap.
I have made a tornado blueprint which consists of a trigger collider, static mesh, radial force (pull objects to himself) and a rotating movement component. This blueprint works like this, the tornado mesh has a trigger collider in it, when the player overlaps that trigger then it will add force upward to the player. Now, it only works with player blueprint which is "RollingPlayer_BP", also i want it to work with multiple blueprints in a way that it needs to add force to those other blueprints too. This other blueprint name is LevelBalls_BP and this blueprint can have many duplication in the level so the force needs to be added to a specific duplication of it in the level.
How could this be done?
Thanks in advance for any help.
asked Jan 04 '17 at 01:35 PM in Blueprint Scripting
If you want to add the same behaviour to classes that don't have much in common like say, a wall and a player, interfaces are the way to go. You can add this interface (maybe call it Ejectable, or something like that) to your RollingPlayer_BP and your LevelBalls_BP and any other blueprint you want. Then in your Tornado blueprint, in your begin overlap code you can check if the overlapped actor implements said interface and then act accordingly. This way you don't have to worry about the type/class of the actor being overlapped.
answered Jan 04 '17 at 06:05 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here