I've been looking around but what if you need to bind it to something out of the normal that's not the character? Let's say a random actor has an event and another class needs to bind to it what would be the best way to bind to that class and access that dispatcher? I noticed a lot of people have dispatchers on characters and you can easily just call getplayercharacter.
Carlos Rivadulla Yeah, you cant do that though, he’s in a comment section (online) so It would be updating the time constantly, and even if you turn that off in the settings or something, It’s based on youtube’s servers not your computers clock.
Ok but what if the actor I'm casting to is not the player? I don't have anything to pin into "object" input pin in the "cast to" node. Another tutorial that explains only a very specific case
Calling other object over: Casting, Reference, Interface, Dispatcher - ok. But what should I use if I want to use an variable with an object type only? Example: A magic spell kill all units with 5 or fewer defense instantly. But dispatcher and interface can't work with a variable with the type "EnemyUnit" and call all enemy units at the same time? I must do a call of the "all actors of class" function and do a slow for loop?
Hey So been learning on how to add event drivin UI for say health for perfect example to learn how it works... So this is whats happening.... My print string shows my health going down from 100-0 in 5 incriments for testing purposes but!! my health bar does not update at all it goes from full to empty in one click when my string finally goes from 5% health to 0% so not sure why its doing that??? Im trying to follow the doc mentory on event drivin for health bar mana bar on the UE4 doc site, Please help on why its not working, my code looks exactly the same as in the Documentation... This is really frustrating please help....
I figured it out!! So what was happening if any one else gets the same problem i set the percent to... 100? but that wasnt working soo... I set it to.. 1? 1 meaning 100% or full and it seems to work perfectly that way..
How would I set this up for updating a timer? It counts down to zero, but I want checkpoints that will add some extra time to it. I want these on the box triggers as I am using those to change the scenery based on which one you go through, but I also want them to update the timer.
Nice simple explanation. I would have preferred if you started with a drawing to illustrate the functionality, or you might have mentioned that it's just an observer pattern. Otherwise great stuff!
Is there a way to have sort of shared variables on multiple actors? I’m trying to make a door that can take multiple types of inputs from different types of buttons. so the door would be essentially searching for an “Is on/off?” boolean from the buttons, but Iv’e no idea how to make it so that the variable is the same for all of the button classes. If possible, This would probably make a great tutorial considering how useful it would be. many thanks in advance of a reply. (:
is there any way to implement this any damage to your other series you added damange perception but didnt really show how to add it with a useable health system. and one other question is there any simple way to get a pawn to get pawn or ai get ai i have plenty of ways to get player but nothing on that thank you for your time
Thanks a lot for posting this, it's very useful! :) I'm curious though, if you can show us in a video, how to create randomly generated rooms and halls via a seed, if possible. Some time ago I searched on that and there's not that much info. Pretty please?
IA_Andrei this may help .... the project file from this video is also located in the Learning section of the Unreal Launcher ... scroll down and look for the Turn Based game example ... good luck ! th-cam.com/video/mI7eYXMJ5eI/w-d-xo.html
This UE4 event system is a really simple concept, that is made hard to understand by inappropriate use of terminology. They all keep using the word event, so its not clear about its direction, is it coming in or going out. Say event dispatcher or event handler , just saying event event event makes no sense Event Dispatcher is Blue, Event handler is red simple as that. And by the way Unreal Engine documentation is the biggest joke. So thanks to the tube teachers.
Is there a reason I don't see these used very often, relative to other solutions? Is it smarter to build well considered and wisely integrated Interfaces, functions and macros? Understood that's not a straight answer. Have been trying to sort out why some solutions might be better than others, and Epic doesn't really help with that side of things with their documentations.
Seconding this question. The setup with inputs presently seems very similar to creating an Interface with a common function, called by player input and defined/acted upon by any listening Actors with that interface. Having input communication handled by an interface imo would make it easier to use one button for a variety of things without casting in each recipient Actor. Dispatchers with UI seems pretty useful though.
Interfaces offer a lot more than this so if you need less, you can use this. Remember, you can target actors that implement special interfaces or have multiple messages in the same interface. This avoids all that. What it is good for is passing data repeatedly between actors that require it. For instance, if you need to record on a widget how many times something happened, you can use this. BUT, the function for binding does the same thing and is not that taxing so really, i wouldn't use it. Another is equipment. If you have a continuous loadout, you can set these bindings to detect damage and currently equipped gear.
think of it like this, the actors with event dispatchers stand in the middle of a crowded area and screams, then the actors that implement it binded to a custom event simply does something when they hear him....thats really all they are...not very useful, infact ive never found a use for it that wasnt better handled with interfaces...i guess to announce a "game over" in a multiplayer game, or that little scroller in shooters that tell all the player "epicpwn killed superkid69"...over all tho, i find them useless. it screams out to everything thats listening for that event....
Widgets, they are by far the biggest reason to use this feature. (Makes widget to widget events far easier and self-contained). Event dispatchers are AMAZING with custom widgets and supposedly actor components. You can create a styled button widget as a template with any combination of widgets inside one widget. For a custom button hover event you: 1) Create a Event dispatcher 2) Match the output variable pins for the eg hover button event 3) Call your event dispatcher once the button hover event is called (within your custom button widget) Repeat for the other events for all your widgets inside your custom widget bp. This allows you to have all the events that were once available to only built-in widgets. Like any widget just click on your custom widget, go down to the button and all your event dispatchers act as regular events which once clicked on will be added with ease to any Widget blueprint that uses them! You do the binding ONCE, no need to add the required interface to EVERY single widget blueprint that wants to use the custom widget. Event dispatchers in widgets when done right are far more convenient than interfaces in widgets due to their encapsulating nature. With interfaces you have implement the interface into every single bp that wishes to use them which can be time consuming abd tedious in my opinion.
I tried to use this, but honestly, just the fact it requires Casting to source (and therefore load entire actor to memory) can be an major issue. BP interface also doesn't care if any participant currently exists. To me, it looks like 2 people at Epic tried to create communication system between BPs. At the end, they could not decide which one is better, so they kept both of them.
Thank you for making the SnackSize videos. Short, simple..pretty effective!
I've been looking around but what if you need to bind it to something out of the normal that's not the character? Let's say a random actor has an event and another class needs to bind to it what would be the best way to bind to that class and access that dispatcher? I noticed a lot of people have dispatchers on characters and you can easily just call getplayercharacter.
While i am not "completely new", event dispatchers are still a bit, well, i need get used to them. Thanks for video.
How does your comment say 1 month ago when the video was released 3 hours ago?
@@AAa-tn5rz Likely a patreon unlisted release
@@AAa-tn5rz he just changed the hour on his computer to looks like a time traveller
Carlos Rivadulla
Yeah, you cant do that though, he’s in a comment section (online) so It would be updating the time constantly, and even if you turn that off in the settings or something, It’s based on youtube’s servers not your computers clock.
@@AAa-tn5rz , well, this is not the first of my documented time travels, here is another:
twitter.com/Thunder_Owl/status/1279384393056993280?s=20
Ok but what if the actor I'm casting to is not the player? I don't have anything to pin into "object" input pin in the "cast to" node. Another tutorial that explains only a very specific case
Just use get actor of class
@@scales3837 Oooo I guess this would work. I was thinking a static event/dispatcher but I struggled hard trying to get it working in BP/C++ in UE
Thank you Ryan!
This should be the first thing people teach regarding blueprint
I was just trying to research this topic yesterday... Thanks!
how to access level blueprint variables in a different actor?
How can use event dispatcher without cast. casting our main character everywhere is bad in terms of optimization
Calling other object over: Casting, Reference, Interface, Dispatcher - ok. But what should I use if I want to use an variable with an object type only?
Example: A magic spell kill all units with 5 or fewer defense instantly. But dispatcher and interface can't work with a variable with the type "EnemyUnit" and call all enemy units at the same time? I must do a call of the "all actors of class" function and do a slow for loop?
cool, i never really used them, seemed a bit confusing but you cleared that out nicely
Hey So been learning on how to add event drivin UI for say health for perfect example to learn how it works... So this is whats happening.... My print string shows my health going down from 100-0 in 5 incriments for testing purposes but!! my health bar does not update at all it goes from full to empty in one click when my string finally goes from 5% health to 0% so not sure why its doing that??? Im trying to follow the doc mentory on event drivin for health bar mana bar on the UE4 doc site, Please help on why its not working, my code looks exactly the same as in the Documentation... This is really frustrating please help....
I figured it out!! So what was happening if any one else gets the same problem i set the percent to... 100? but that wasnt working soo... I set it to.. 1? 1 meaning 100% or full and it seems to work perfectly that way..
How would I set this up for updating a timer? It counts down to zero, but I want checkpoints that will add some extra time to it. I want these on the box triggers as I am using those to change the scenery based on which one you go through, but I also want them to update the timer.
Thanks for video
Nice simple explanation. I would have preferred if you started with a drawing to illustrate the functionality, or you might have mentioned that it's just an observer pattern. Otherwise great stuff!
Thank You. Very helpful.
could this be used with ai to mock an rts?
Holy shit bro you saved me. Thanks a lot!!
Thanks
Great video. Thanks.
Is there a way to have sort of shared variables on multiple actors?
I’m trying to make a door that can take multiple types of inputs from different types of buttons. so the door would be essentially searching for an “Is on/off?” boolean from the buttons, but Iv’e no idea how to make it so that the variable is the same for all of the button classes.
If possible, This would probably make a great tutorial considering how useful it would be.
many thanks in advance of a reply. (:
You can have a button master class bp and child bp for all your buttons. All the buttons will share the same variables/code but different values
Anonyzone Thanks! I’ll look into that.
is there any way to implement this any damage to your other series you added damange perception but didnt really show how to add it with a useable health system. and one other question is there any simple way to get a pawn to get pawn or ai get ai i have plenty of ways to get player but nothing on that thank you for your time
how do we cast to level blueprints and or other actor blueprints successfully?
Thanks a lot for posting this, it's very useful! :) I'm curious though, if you can show us in a video, how to create randomly generated rooms and halls via a seed, if possible. Some time ago I searched on that and there's not that much info. Pretty please?
IA_Andrei this may help .... the project file from this video is also located in the Learning section of the Unreal Launcher ... scroll down and look for the Turn Based game example ... good luck ! th-cam.com/video/mI7eYXMJ5eI/w-d-xo.html
Damn this had me until I seen you have to cast to the actor calling the binding event..
This UE4 event system is a really simple concept, that is made hard to understand by inappropriate use of terminology.
They all keep using the word event, so its not clear about its direction, is it coming in or going out.
Say event dispatcher or event handler , just saying event event event makes no sense
Event Dispatcher is Blue, Event handler is red simple as that.
And by the way Unreal Engine documentation is the biggest joke. So thanks to the tube teachers.
thxxxx!!!
WHOLE POINT IN TRYING TO LEARN ed was to avoid casting and u go an throw a cast in whts the point?
Event dispatchers != Casting
One is not a replacement of the other, they do different jobs.
OMFG the "Bind Event To test event dispatcher" doesn't even exist as an option. like omfffggg NEVER should such a simple task be so fucking convoluted
nevermind it was the stupid context aware option that was hiding it
Oh hey 2nd comment
Is there a reason I don't see these used very often, relative to other solutions? Is it smarter to build well considered and wisely integrated Interfaces, functions and macros? Understood that's not a straight answer. Have been trying to sort out why some solutions might be better than others, and Epic doesn't really help with that side of things with their documentations.
Seconding this question. The setup with inputs presently seems very similar to creating an Interface with a common function, called by player input and defined/acted upon by any listening Actors with that interface. Having input communication handled by an interface imo would make it easier to use one button for a variety of things without casting in each recipient Actor. Dispatchers with UI seems pretty useful though.
Interfaces offer a lot more than this so if you need less, you can use this. Remember, you can target actors that implement special interfaces or have multiple messages in the same interface. This avoids all that.
What it is good for is passing data repeatedly between actors that require it. For instance, if you need to record on a widget how many times something happened, you can use this. BUT, the function for binding does the same thing and is not that taxing so really, i wouldn't use it.
Another is equipment. If you have a continuous loadout, you can set these bindings to detect damage and currently equipped gear.
think of it like this, the actors with event dispatchers stand in the middle of a crowded area and screams, then the actors that implement it binded to a custom event simply does something when they hear him....thats really all they are...not very useful, infact ive never found a use for it that wasnt better handled with interfaces...i guess to announce a "game over" in a multiplayer game, or that little scroller in shooters that tell all the player "epicpwn killed superkid69"...over all tho, i find them useless. it screams out to everything thats listening for that event....
Widgets, they are by far the biggest reason to use this feature. (Makes widget to widget events far easier and self-contained).
Event dispatchers are AMAZING with custom widgets and supposedly actor components.
You can create a styled button widget as a template with any combination of widgets inside one widget.
For a custom button hover event you:
1) Create a Event dispatcher
2) Match the output variable pins for the eg hover button event
3) Call your event dispatcher once the button hover event is called (within your custom button widget)
Repeat for the other events for all your widgets inside your custom widget bp.
This allows you to have all the events that were once available to only built-in widgets.
Like any widget just click on your custom widget, go down to the button and all your event dispatchers act as regular events which once clicked on will be added with ease to any Widget blueprint that uses them!
You do the binding ONCE, no need to add the required interface to EVERY single widget blueprint that wants to use the custom widget.
Event dispatchers in widgets when done right are far more convenient than interfaces in widgets due to their encapsulating nature.
With interfaces you have implement the interface into every single bp that wishes to use them which can be time consuming abd tedious in my opinion.
I tried to use this, but honestly, just the fact it requires Casting to source (and therefore load entire actor to memory) can be an major issue. BP interface also doesn't care if any participant currently exists.
To me, it looks like 2 people at Epic tried to create communication system between BPs. At the end, they could not decide which one is better, so they kept both of them.