Unreal Engine 4 SnackSize - Event Dispatchers

Поделиться
HTML-код
  • Опубликовано: 20 окт 2024

Комментарии • 51

  • @sithmaster
    @sithmaster 4 года назад +1

    Thank you for making the SnackSize videos. Short, simple..pretty effective!

  • @matthewa7306
    @matthewa7306 4 года назад +1

    I was just trying to research this topic yesterday... Thanks!

  • @DRAWKCABLLA
    @DRAWKCABLLA 2 года назад

    This should be the first thing people teach regarding blueprint

  • @Latvian3Dman
    @Latvian3Dman 4 года назад +13

    While i am not "completely new", event dispatchers are still a bit, well, i need get used to them. Thanks for video.

    • @AAa-tn5rz
      @AAa-tn5rz 4 года назад +1

      How does your comment say 1 month ago when the video was released 3 hours ago?

    • @iaandrei
      @iaandrei 4 года назад

      @@AAa-tn5rz Likely a patreon unlisted release

    • @carlosrivadulla8903
      @carlosrivadulla8903 4 года назад

      @@AAa-tn5rz he just changed the hour on his computer to looks like a time traveller

    • @thesensur6214
      @thesensur6214 4 года назад

      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.

    • @Latvian3Dman
      @Latvian3Dman 4 года назад +1

      @@AAa-tn5rz , well, this is not the first of my documented time travels, here is another:
      twitter.com/Thunder_Owl/status/1279384393056993280?s=20

  • @MrKosiej
    @MrKosiej 4 года назад +1

    cool, i never really used them, seemed a bit confusing but you cleared that out nicely

  • @yazzindev
    @yazzindev 2 года назад

    Thank you Ryan!

  • @justinrivera7800
    @justinrivera7800 2 года назад +1

    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.

  • @biaxthepanda
    @biaxthepanda 10 месяцев назад

    Holy shit bro you saved me. Thanks a lot!!

  • @PiterTraceurFA
    @PiterTraceurFA 2 года назад +2

    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

    • @scales3837
      @scales3837 2 года назад +1

      Just use get actor of class

    • @justinrivera7800
      @justinrivera7800 2 года назад

      @@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

  • @Goddisz
    @Goddisz 4 года назад +1

    Thanks for video

  • @007LvB
    @007LvB Год назад +1

    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!

  • @andrewabramow1806
    @andrewabramow1806 2 года назад

    Thank You. Very helpful.

  • @Rocklee-vv
    @Rocklee-vv 2 года назад

    how to access level blueprint variables in a different actor?

  • @Xegethra
    @Xegethra 2 года назад

    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.

  • @rifat.ahammed
    @rifat.ahammed Год назад

    Thanks

  • @GrounddevLF
    @GrounddevLF 4 года назад

    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

  • @Ruumablood
    @Ruumablood 2 года назад

    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....

    • @Ruumablood
      @Ruumablood 2 года назад +2

      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..

  • @vicwaberub5297
    @vicwaberub5297 2 года назад

    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?

  • @BquuD28123
    @BquuD28123 Год назад

    How can use event dispatcher without cast. casting our main character everywhere is bad in terms of optimization

  • @skysoftware4581
    @skysoftware4581 2 года назад +1

    WHOLE POINT IN TRYING TO LEARN ed was to avoid casting and u go an throw a cast in whts the point?

    • @RyanLaley
      @RyanLaley  2 года назад

      Event dispatchers != Casting
      One is not a replacement of the other, they do different jobs.

  • @stevenwynn819
    @stevenwynn819 4 года назад

    Great video. Thanks.

  • @thesensur6214
    @thesensur6214 4 года назад

    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. (:

    • @An0ny
      @An0ny 4 года назад +1

      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

    • @thesensur6214
      @thesensur6214 4 года назад

      Anonyzone Thanks! I’ll look into that.

  • @iaandrei
    @iaandrei 4 года назад

    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?

    • @TCMabe
      @TCMabe 4 года назад +1

      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 ! ruclips.net/video/mI7eYXMJ5eI/видео.html

  • @joeanrachelmiller6529
    @joeanrachelmiller6529 4 года назад

    could this be used with ai to mock an rts?

  • @DevGods
    @DevGods 3 года назад

    Damn this had me until I seen you have to cast to the actor calling the binding event..

  • @JaskanFactor
    @JaskanFactor 3 года назад +2

    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.

  • @cettura
    @cettura 3 года назад

    thxxxx!!!

  • @DRAWKCABLLA
    @DRAWKCABLLA 2 года назад

    how do we cast to level blueprints and or other actor blueprints successfully?

  • @dabbopabblo
    @dabbopabblo 3 года назад

    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

    • @dabbopabblo
      @dabbopabblo 3 года назад

      nevermind it was the stupid context aware option that was hiding it

  • @quintongordon6024
    @quintongordon6024 4 года назад

    Oh hey 2nd comment

  • @FRACTUREDVISIONmusic
    @FRACTUREDVISIONmusic 4 года назад +4

    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.

    • @heyitsjoshmusic
      @heyitsjoshmusic 4 года назад +4

      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.

    • @philzan3627
      @philzan3627 4 года назад +1

      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.

    • @omegablast2002
      @omegablast2002 4 года назад

      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....

    • @IWillYeah
      @IWillYeah 4 года назад +5

      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.

    • @JanHarcarik
      @JanHarcarik 4 года назад +4

      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.