x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Add force to multiple blueprint actors/pawns on trigger overlap.

Hi!

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.

alt text

Product Version: UE 4.13
Tags:
tornado_bp.png (460.4 kB)
more ▼

asked Jan 04 '17 at 01:35 PM in Blueprint Scripting

avatar image

Balint3DDesign
42 8 14 19

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Jan 04 '17 at 06:05 PM

avatar image

Rekenq
722 19 6 26

avatar image Balint3DDesign Jan 05 '17 at 01:07 PM

Thanks for your answer! Now, it's more simpler to add more blueprints to react with the tornado. I have attached a picture with the current setup of the tornado blueprint, if someone want to do similar things in blueprint.

alt text

tornado_bp2.png (555.0 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question