Events

0 favourites
  • 2 posts
From the Asset Store
14 amazing sound files of game events like Level Ups, Level Completes, object spawn, object taking etc.
  • So my game has lots of if conditions and it has gotten to a point where I have to optimize for better performance. 400 npcs walking around, constatly checking if they have a line of sight of enemy and all that stuff. So my question is about the events. if one "if" is negative, does it continue checking the rest ? ex. 5 ifs and the first one doesnt meet the requirements, does the game check the remaining ones or just goes to the next event ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I believe if you have several conditions in one event and the first condition is false, others are not evaluated. (Unless it's an OR-block)

    But if you have several conditions in one expression, for example Enemy.Type="zombie" & Function.Call("GetEnemyHealth")>0 , the function will still be called and evaluated even if the enemy is not zombie.

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