Event Trigger (Construct 3 Plugins)

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

  • Order by
  • Doesn't this work with only the Function object?

    Call the Function "Screen Touch" (from your blog post), and in this function call other functions or other code

    • You can organize your logic many ways. Can you do this with all functions and have it work, of course. Can you create a function that calls other functions, of course. This is more a way of organizing code so that you fire an event and don't worry about who or if anyone handles it. It is the responsibility of other events sheets to decide to handle it or not. Instead of having nested functions set up, where one function ultimately has knowledge of all things that need to be called. It's just another way to organize and reason about your code. So in my game the benefit is that I'm encapsulating all behavior in a components' event sheet and there is no logic anywhere that has to specifically call it or any other component. If I want to add it so that another component listens for that event, I just make it listen for it, no other changes required.

      So like I said in the blog, will this work for everyone, probably not. It just depends on how you like to organize and maintain your code.

      • Yes but my point is: you can already do that with Functions.

        The way i see it - this is just another way to organize events, but the way you describe it, it should work with Functions too.

        1. = Function Plugin = F

        2. = Event Trigger Plugin = ET

        Starting the Event - When the Event happens:

        1. F Call "Screen Touch"

        2. ET Send Event "Screen Touch"

        On any other Event Sheet:

        1. F On "Screen Touch" is called (= triggered) - does stuff

        2. ET On Sent "Screen Touch" is triggered (= is called) - does stuff

        Want to add another thing that happens when the "Screen Touch" Event happens?

        1. Add another F On "Screen Touch" in any Event Sheet

        2. Add another ET On Sent "Screen Touch" in any Event Sheet

        • (

          This is a Test Text for Website Issues.

          "

        • "Call Function" and "On Function" are just different words for "Send Event" and "On Sent".

          Both Plugins:

          "Call"/"Send" an Event with multiple Parameters.

          Can have multiple "On Function"/"On Sent" Conditions in different/same Event Sheets.

          (I may be overlooking something, but i just cannot see the difference other than the words)

          • Looking at the documentation for the Function plugin, it describes it and shows examples of using like a function in a traditional programming language like what I am used to. Usually you have one "On" block that gets executed (shared code). It appears though that you are correct you can use multiple "On" blocks and have them all fire on one "call". I wasn't aware that could be done.