Unreal engine 4 tutorials
We can now write any text into the My New Input variable. This input variable pin can be connected to any variable with the same type. Now that your custom event is being called by the BeginPlay event you can see the input variable. In our case this is “My Custom Event”.Īs your custom event is connected to an execution pin, it is now being called by the other event. To run your custom event simply create a “Event BeginPlay” node, drag from the execution pin and type the name of your new custom event. Once the “Print String” node is created, connect the “My New Input” variable from your custom event to the In String pin on the Print String node. This is the easiest way to test if the custom event is working correctly. Now that are custom event is created and the input variable has been setup, we can now create a “Print String” node to display the value of “My New Input” on the screen. The custom event in the event graph will now look like this. The finished custom event input should now look like this. When making your own custom events you can use any of the variable types shown. This means we can use text values in our input. We are changing this variable from Boolean to String. On the right side we can then change the input variables type. The left side text box is the name that will be displayed inside the custom event. To add an input firstly click your custom event in the event graph and look to the right side of the screen.Ĭlick the “New Parameter” button shown below to add a new variable to the inputs list. These are used to send information to the nodes running from the custom event.
Similar to functions, custom events can have input variables attached to them. It’s good practise to name your custom event based on its purpose.įor this guide we named our custom event “My Custom Event”. To create a custom event, right click anywhere in your actor’s event graph and write “Custom Event”.