Seting range not working (SOLVED)

0 favourites
  • 7 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hello :)

    I'm using two conditions to set a range:

    Enemie.X <= Player.X +200

    Enemie.X >= Player.X -200

    This is working. But when I use the inverse, it dont work.

    I try two ways:

    -just press I and then inverse the condition

    -set: Enemie.X > Player.X +200

    Enemie.X < PLayer.X -200

    Someone know why?

    Thank you.


  • No, don't do that. Use "Line of Sight" behavior.

    Player has Line Of Sight to Enemy ...........

    Or invert it to check if player doesn't see enemies.

  • Thank you,dop2000, one more time, btween much others times.

    Nice, Ill look on that. Did you know why its happens? Because the lógic for me is right, só whats happening? It Will be Very usefull tô know better How the thinks Works, I imagine.

  • It's difficult to figure out and explain what happens when you invert both conditions, and when there are multiple enemies on the layout..

  • I think you had the +200 -200 reversed, which means you were looking for enemies outside the range instead of inside the range...


    Enemie.X > Player.X -200

    Enemie.X < PLayer.X +200

  • AllanRI'm seraching for enemies outside the range with the conditions:

    Enemie.X > Player.X +200

    Enemie.X < PLayer.X -200

    What give me:


    I try two diferent ways, that above, and invert the conditions I use to caught the inside range.

    dop2000So, besides trying to reverse the conditions, this expressions above its not working.

    So for me "looks like" a simple expression of position, and I think its important to know why its "not working"(or what Im not understanding).

    Thank you guys AllanRdop2000 By now I will see the line of sight Dop2000 indicated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Solved!

    So I realized that this two functions, in the way I was using, could work for a inside range, because one condition not exclude, but complement, the other, but not for a outside range because or the enemie match one condition or match other, not the two at same time. So, how I used the conditions together (like I have to use to the inside range case) this was not working.

    So a OR block can solve this.

    Thank you guys for coming.

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