Trigger an event from another event (maybe using signals?)

0 favourites
  • 3 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • I want to keep all of my sound events in a sound group, but I have a few conditions/events that are specific and I'd like to have a "play sound" event in my soundfx group happen when a condition outside of the group occurs. I tried using signals, but the only way it worked was by having "if true once" as a condition, and that wasn't useful since it only happened once. Can you trigger events in one event FROM another event?

  • Use a function (add a function object), set the triggering event to call the function "sfx" (you can name it what you wish) with whatever parameters you wish as an action. Also pass "sound file" (or some other kind of flag) as parameter 0. Once you get comfortable with using functions you can experiment with multiple parameters.

    On function call "sfx":

    Define/add a local variable for "sound file" under the function "sfx" called event.

    Set "sound file" to function.param(0) (this will retreive parameter 0)

    Next do subevents under the function called condition:

    on "sound file"=whatever

    play sound applicable to whatever

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Use a function (add a function object), set the triggering event to call the function "sfx" (you can name it what you wish) with whatever parameters you wish as an action. Also pass "sound file" (or some other kind of flag) as parameter 0. Once you get comfortable with using functions you can experiment with multiple parameters.

    On function call "sfx":

    Define/add a local variable for "sound file" under the function "sfx" called event.

    Set "sound file" to function.param(0) (this will retreive parameter 0)

    Next do subevents under the function called condition:

    on "sound file"=whatever

    play sound applicable to whatever

    Thanks, I forgot about functions! Need to learn a bit more about the parameters :/

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)