Announcement

Collapse
No announcement yet.

Delegate and Timer Handle Variables in Blueprint

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [FEATURE REQUEST] Delegate and Timer Handle Variables in Blueprint

    Maybe this exists already, but I can't find it.

    Is there any chance that we could get timer and delegate handles in variables in blueprint? Right now using delegates in blueprints can make things really gross really quick because all of your delegate binding and unbinding has to live in the same eventgraph and it all has to tie to the same output of the bound event. Afaik they're just wrappers for ints, so I'm not sure why they'd be too difficult to put in and they'd make it much easier to make good looking blueprints.

    #2
    I would love to see that delegate stuff aswell... Imagine you could exchange delegates with ease in a Function which takes delegate parameters..
    Hobby game developer from Germany Follow me on Twitter!
    Stuff I made:
    Steam Workshop Tutorial/Wiki
    Making a full working translation for your game and change it at runtime

    Comment


      #3
      Originally posted by iUltimateLP View Post
      I would love to see that delegate stuff aswell... Imagine you could exchange delegates with ease in a Function which takes delegate parameters..
      These are my thoughts. I think if I didn't do most of my stuff in C++ I'd probably never notice, but assigning/clearing delegates works so much better on that side that doing it in blueprints feels even clunkier.

      Comment


        #4
        Not sure precisely what it is you want to be able to do, but I think the CreateEvent node would handle most of it. That will give you a square delegate pin for the function/event you select, which you can use with the binding functions. It allows you to setup/remove bindings from within a function graph or different event graph.

        For timers, you already have the dedicated timer handle which you can use to cancel the timer, and since timers are not multicast then that's effectively the same thing as unbinding.

        It's true delegate support in blueprints is limited, in particular passing delegates/callbacks as parameters, but I think that's probably intentional to keep things simple.

        Comment


          #5
          The problem is that I can't save the CreateEvent node's output pin into a variable, so if I want to clear a bound delegate or assign a delegate in a lot of places, they all need to exist in the same graph as the CreateEvent node, and it makes your blueprints really ugly. Essentially what I want is to be able to save the CreateEvent node's delegate pin value into a variable so every reference in my blueprint is stuck to that pin in the same eventgraph instead of being able to do it in functions/macros/separate event graphs.

          Timer's had the same problem, but I see that Timer Handle's were switched to a blueprint type in a later version than the one I'm developing on. So pretty much what I want for delegates is what they added for timers.

          Comment


            #6
            Well I'm pretty sure you can just use another CreateEvent node, set to the same function, and plug that into an Unbind node or whatever. Haven't tested it, but it's basically just identifying a function by name so pretty sure that would work.
            I agree though, without having delegate variables then you're limited to when you know at design time what will be bound to what.

            Comment

            Working...
            X