Events Overview

From The KillerJim Mod Wiki


The use of events to pass information between objects is a key aspect of any computer system.

Unreal Engine 4 provides a "custom event" mechanism that allows you to pass events from "owning" clients to the "server", which can then send them onto all other clients ("multicast). However this method relies on the actor that contains the event actually "owning" the actor; which in many cases (with actors "in" levels) the owner is the server.

What does an event provide?

KJMod "Events" are specially designed to provide a facility that is often hard to accomplish in UE4, that is to provide a way of passing generic event data between two actors AND allow any clients to execute events on the server. The last part is important, UE4 maintains a strict relationship were clients can only execute UE4 events on actors they own - so if a client owned ActorA, then it could call an event on ActorA that could be executed on the server.

Unfortunately for modding you don't always have the ability to own a certain actor. If we take the use case of "Roleplay Doors" (RP Doors) in which a level contains a ton of door actors, the server will load the level and effectively own the doors. The door however can be renamed, by clicking a UI button (when standing at the door) and entering a new title for the door. However, the client does not have a "path" to get the new title from itself to the server, as the client doesn't own the door and can't execute a server-side event.

This is where Modiverse events come into use; they provide a method where a client can always send a name event (with multiple parameters) to another actor who will be listening (and expecting) such events.



Developer Reference