Eventing question

0 favourites
  • 5 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • <img src="http://dl.dropbox.com/u/61666915/eventing.png" border="0" />

    i was thinking that subevents keep the picked objects

    the image shows a working version, but without the additional var comparison, the counters add up to eachother(both the hpfight objects), so the picking must be wrong and doesnt account for the parent comparisment

    any idea why it would do it like this?

  • Could you make a simpler demo in a new .capx? It might make it easier to understand, without the specifics of your project.

  • Ashley

    capx

    so in this example, i would expect that the parent event picks the right object and the subevent would add to the correct counter, instead they are adding up on each    ( press space to add to counter )

  • The issue here is the order you use the trigger.

    Triggers are "out of the code" in their execution.

    You can see the picking is correct for the "every 1 sec" event, it still is a strange logic imo, but it does keep the picking of the parent event.

    When you press space, the trigger is not considered a subevent.

    But you can then affine the picking as subevent of the trigger "on space pressed".

    Working capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Kyatric, appreciate the help but this is a very simple example, i was using the enemy and player var as a "state" where under everything is related to the enemy or the player, so i dont have to repeat the statement and can have multiple actions or conditions under this, i think it makes sense

    i already had a working version, if you add isplayer var to the trigger is works, so i rather was asking why it didnt take its parent condition into account, where does it state that triggers are "out of the code" can i have comfirmation that this is the only way it suppose to work Ashley

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