Announcement

Collapse
No announcement yet.

Pass event as function parameter?

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

    Pass event as function parameter?

    Hello,

    I want to write my own "Timer by Event"-function where the user can input the event like here:

    Click image for larger version

Name:	Event.png
Views:	82
Size:	22.7 KB
ID:	1774612

    Is this possible with blueprints? If not, how to make it with C++?

    Thank you,

    Thilo

    #2
    If your event doesn't need parameters, you can call it by name. Make a String parameter that will be the name of the function and an object parameter which will be the blueprint that owns the event. Then call Set Timer by Function Name. You can't pass parameters this way, but it's the best way to create a function caller without calling a specific event from an object reference.

    If you're comfortable with C++, double-click the Set Timer node and check out what they did to create that Event pin.
    Procedural, modular, on-the-fly animation - iTween For UE4
    - Actors - Components - UMG - Ease In - Ease Out - Path-constrained Animation - $0

    Runtime Datatable
    -All the fun of DataTables dynamically loaded from text or Google Sheets while your game is running!

    Comment

    Working...
    X