Why receiver on custom events and not sender?

FlowCanvas Forums Support Why receiver on custom events and not sender?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2078
    sinzer0
    Participant

    I often find myself needing to get the sender of a custom event, but as far as I can tell that is not possible without passing the gameobject with the event.

    Why is receiver exposed when receiver is always the same as self in the graph that receives the event? As far as I can tell.

    For example I have to pass the game object that sent the event if I need to get access to it’s blackboard etc (see the attached image).

    It would be nice to have the sender of an event available by default without having to use the event parameter for the sender.

    Attachments:
    You must be logged in to view attached files.
    #2085
    Gavalakis
    Keymaster

    Hey,

    In case the “Target Mode” of the event node, is set to “Single Target”, then indeed the receiver is itself, but in case it is set to “Mutliple Targets”, the receiver is different. Having said that, also having an output port with the “Sender” is obviously a good idea.
    I will add this in for the next version.

    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.