How do I tell if any event in a group was triggered?

0 favourites
  • 14 posts
From the Asset Store
Game Triggers is as versatile as a Swiss army knife, and will be a great resource for any type of game you're creating.
  • Let's say I have a group filled with events - is there a way to tell if any event in that group was triggered?

    Currently I have to put a Global variable set in nearly all of these events, but it would be MUCH easier (and more dependable) if there was a way to tell it that way.

    Is this possible?

  • Did u try using breakpoints?

  • I mean for the app, not for myself to know if it did work or not. Or are breakpoints also usable as triggers for events without debug mode?

  • I don't know really. Just though't i'd suggest it because it would trigger the breakpoint at that particular point. That way you kno its attempting to trigger it.

  • Yeah, the thing is the app needs to know, not me, I already know

    If there's no way this could be a decent feature.

  • Mild bump. As it's still relevant - adding set global var to countless events seems inefficient.

  • I don't think being in a group makes any difference to the question? AFAIK there's no built in trick to knowing if an event is executed, but that would be some handy meta-info to be able to grab when needed

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Being in a group does make a difference - if it's just a single event then tripping a global variable is a piece of cake, if there's tens of them and you'd like some to trigger it and others not it's quite laborous changing the vars every time.

  • Being in a group does make a difference - if it's just a single event then tripping a global variable is a piece of cake, if there's tens of them and you'd like some to trigger it and others not it's quite laborous changing the vars every time.

    From your use case yes, but I meant if there's a way of knowing any event has fired, then it will also work for events in groups. Anyway sounds like a handy feature, but how would you reference the event?

  • Hence the groups: If event in group "X" has fired

  • Hence the groups: If event in group "X" has fired

    Sorry I tend to take intuitive leaps but more often than not fall off a cliff

  • Sorry I tend to take intuitive leaps but more often than not fall off a cliff

    np, I'm the same way

    But yeah, this could make certain things much more straightforward. If there's no workaround perhaps Ashley could add "Have any events in group 'X' fired" event as a feature.

  • Why do you need to do that? For a feature suggestion to be compelling you need to outline a really good use case and describe why it's not easily possible by any other means, in detail. Detecting if any event in a group has run seems like a pretty niche thing to do.

  • Ok, an example - 24 keypresses have a certain effect and if that is the case we should do actions A and B, 16 other keypresses have a different effect and only action B should be taken. Currently I have to add a Set global variable to each and every one of those keypresses and if the order or such needs to be changed go through them again. Action B is reasonably extensive so doing it on any keypress would be wasteful.

    I suspect plenty of other uses could be found, such as, say, changing things in a settings screen, etc - you could just add a single save event at the end if there's been any activity in a given group, be it clicks, keystrokes or something else. Or, the player gets damaged by one of umpteen different enemy families, each one with different impact fx, etc, but in the end you check but this one thing for a screen flash for damage. And so on and so on.

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