CREATOR4's Forum Posts

    Hello;

    Sorry this is a little off topic--but how do you get your code snippets to print out so neatly. I always have to take a screen shot. Are you using cut and paste to generate those?

    thanks, and I hope you solve your wait problem.

    yours

    winkr7

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Looks like Asmodean already solved your problem but I just wanted to throw in that you can also do this:

    Goodie > On collision with Baddie >

    set angleOfCollision to angle(goodie.x, goodie.y, baddie.x, baddie.y)

    This will get the angle of baddie compared to goodie. This is the way I do it and then I have a function that converts angles to directions like

    if angle is between -45 and 45, return "Right"

    if angle is between 45 and 135, return "Down"

    etc

  • What klabundee suggested will work

    There's also a system expression that's great for this called clamp()

    You would do

    Clamp(hero damage - enemy defense, 0, infinity)

    This would make it so the damage never goes below 0 and never goes higher than infinity

  • Else is fine if you have only two outcomes. 'wait 0 seconds' is used if you have more complex logic. You can't use else if you have three possible outcomes because you will find yourself with the original problem.

    Else can handle more than 2 outcomes

    and so on

  • Add 'Else' to the second condition, so only one is ever evaluated at a time.

  • Did you change their tags in the properties panel?

    If you're looking to disable On Collision events with filters I don't believe the Solid tags handle that