Sound Event Sheet practice?

This forum is currently in read-only mode.
  • Say you have a platform game and you want to add the ability to climb walls if you pick up a certain object... Is it sound to do "If Player('HasClimbingShoes') = 1 then include Even Sheet "Player Climbing" (don't know the pseudo code standard around here, hope you get it)?

    ... Or should I just include those checks in the actually Events? If so, how many Conditions can you have on events? Does it matter if you have 15 conditions?

    I have a tendancy to think that stacking of the conditions matters, so if you have the least resource heavy condition first (say, is key pressed?) it will not go through the other 15 conditions?

    Thanks for your time

    ~Julmust (Swedish Christmas Beverage)

  • You can't include an event sheet as an action, either the sheet is included or it's not.

    But you can activate/deactivate event groups in an event sheet that has all of your player controls. Make your Climbing group deactivated by default and just activate it when the player picks up the shoes.

    I have a tendancy to think that stacking of the conditions matters, so if you have the least resource heavy condition first (say, is key pressed?) it will not go through the other 15 conditions?

    That is correct.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's weird that event sheets are always included, but you can place them as subevents. This confused me.

    Then I realized it was being included always, even if the subevent wasn't firing. So I moved all of that code into a function object and call that function with the condition I wanted. I made the function object global so I can reference it from the event sheet and call it from wherever I want.

  • Just out of curiosity, madster - did you benchmark these changes? And did it make any different to performance?

  • You can't include an event sheet as an action, either the sheet is included or it's not.

    But you can activate/deactivate event groups in an event sheet that has all of your player controls. Make your Climbing group deactivated by default and just activate it when the player picks up the shoes.

    > I have a tendancy to think that stacking of the conditions matters, so if you have the least resource heavy condition first (say, is key pressed?) it will not go through the other 15 conditions?

    >

    That is correct.

    Thanks, that worked like a charm and is probably the right way of doing it

  • Just out of curiosity, madster - did you benchmark these changes? And did it make any different to performance?

    I didn't, but it shouldn't make any noticeable difference, since it's still one call per tick.

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