in this situation i would use a custom event within the character bp. it looks like the two scripts you posted are basically the same. so instead of using two separate scripts just use one that can be called from multiple locations. in the following explanation i am assuming that your trampoline is a actor blueprint and it has a overlap event.
to accomplish what i said above you will first need to create a custom event in the character bp. to do this right click on the graph and type in custom event. name this event whatever you like, in this example ill name it changephysics. now connect this custom event to the first set node you have (the set air control). note using this method you will not need to cast to the trampoline actors.
now to modify the trampoline actors. go into the event graph and off of the event overlap cast to the player characters actor type. on the cast node look for the blue object pin on the left, drag off this pin and search for get player character. next drag off the blue pin on the right labeled as (insert character class here) and search for the changephysics event. connect any needed exe pins and your done. doing this will now call the changephysics any time the trampoline actor is overlapped and this process can be copied to any other actor that you want to trigger the same event by just doing this paragraph.
As a ‘noob’, I appear to have a simple, yet project-halting issue with my blueprint. I would like to be able for my Sidescroller Character Blueprint to utilize multiple overlap events in the same blueprint.
Currently, two trampolines are set up so that my character can bounce on them. In the two different trampoline’s Blueprints (not displayed), they successfully launch my character, but alas my character’s psychics are not correct for the bounces to work correctly. Below is my character’s Blueprint. There are two different instances of when my character’s movement psychics MUST change (for a very short period) to propel them in the correct direction.
Is there some sort of event manager I could use? I did try using Branches, but I could not figure out how to use them, even with several tutorials, getting very close but no luck. If there is any kind of way to do this, even if it is complex, your help is extremely appreciated. With this solved, I can utilize many different types of bouncers and trampolines as well as all kinds of modifiers for my character.
Tldr; I want my character to use both of these trampolines. They currently can’t. Please help.
Thank you very much for the advice. I gave it a go and it does work, however, this may not be what I’m looking for. Here’s a plot twist for you: Below are 2 other completely different overlap events in my Character Blueprint.
Your example of the custom event was efficient, but I’m not sure how to use it in this situation. So, what’s your take on what to do with these events? Thanks in advance.
Just attempted that. No luck still. I just tried going back to the branches method, but I must still be doing something wrong, nothing has worked. Could I use the branches to make it so that the Event Actor Begin Overlap reads one event at a time (the Speedrunner Powerup, the Bumper, and the Gravity Reverser) if so, could you please provide a visual example? I feel like this must be such a simple fix and I can’t see what I’m doing wrong. Thanks for the help.
Scratch that last comment! I got it working! Using the custom events worked I just didn’t know I was supposed to put them in the trampoline’s BP! Thanks for your help!