Construct 3 r405

You're viewing a single comment in a conversation. View all the comments
  • 3 Comments

  • Order by
  • Basically you decouple the event sender from the event receiver.

    So instead of using this line:

    On Player Created -> Call Enemy Jump Action

    You instead do:

    On Player Created -> Send Signal named "PlayerCreated"

    On Signal "PlayerCreated" -> Call Enemy Jump Action

    This is useful because now the player doesn't care about the enemy and vice versa. Each one of them can use its own event sheet and logic. Unlike the first example, which if you delete Enemy, or move the Player code to a project that doesn't have Enemy, the code will break (because Player and Enemy are dependent on each other).

    The event-based game architecture is well-known in the industry, and you will find lots of videos about it.