Unreal Engine 4 Blueprint Custom Events

Source: Internet
Author: User

UE4 's blueprint is conceptually very similar to programming languages such as C + +. In the blueprint you can define variables, functions, macros, and so on, which can also be inherited by advanced points. This does not count, we can also define the blueprint interface to standardize the behavior of subclasses. Basically C + + can be done, the blueprint can also be done, and is WYSIWYG, drag-and-drop, instant compilation, immediately effective.

As a general rule, programmers do the function modules in C + +, level designers, and blueprints to create the logic of the game, the level master does not need to program, can create their own logic, at least in the logic of this layer does not require the programmer to cooperate. This is much more efficient, and there is no scripting language like Lua to participate, and designers have a much lower threshold.

Here's how you'll use the custom events in the Blueprint:

On the Blueprint's toolbar, we can see 5 buttons through which we can create elements of multiple blueprints, respectively.



You can create a custom event by adding a custom event to the right-click, add Event-in the blueprint. Custom events can specify input parameters, and can also specify whether the event can be synchronized on the client and server side.


Replication has four options, which are not replicated by default, can be selected for multiplexing, run on the server, run on the client to which it belongs, and can be selected if the event needs to be routed over the network.

Enter a value column to add parameters, the same type as the variable type.

Let's do an example of how to trigger this custom event when the K button is pressed to print a hello.


Triggers a custom event, just like a function call, and, if there are arguments, you can specify the parameters like a function.

We can also bind events to different schedulers in a dynamic bind, just like delegate in a high-level programming language. For example, we press K, bind myevent for the scheduler, press F, bind MyEvent1 for the scheduler, and invoke the same scheduler, triggering behavior is different.


Unreal Engine 4 Blueprint Custom Events

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.