Event set up

0 favourites
  • 5 posts
From the Asset Store
A whole set you need to create a gorgeous winter 2d game
  • I'm pretty sure I got this right, but something doesn't seem to be working for me. Below is a copy of my event string for singles. The thought is that when the ball hits a part of the field it enables the variable Single. When that happens the bases are filled accordingly. For some reason, on certain layouts I've noticed it gives the right bases output, but the score changes when it shouldn't be.

    I assumed that's cause when one variable changes(like 1st base) then it triggers another event, but all the events change the "Single" Variable to 2, so wouldn't that disable all events under Single? Or am I missing something?

    <img src="http://s24.postimg.org/vatlx6pt1/image.png" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your problem comes from the fact that some cases cause two or more conditions to successively become true. A problem easily avoided by adding an else statement to each condition (excepted the first).

  • So, the events are being triggered so fast that my action of "+1 to Single" in the venets isn't getting done quick enough? Cause wouldn't making "Single = 2"(thus not meeting the requirement of "if Single = 1") cause the events to stop?

  • No, that is not the case. Once the "Single = 1" condition has been evaluated and proven true, all sub-events will be executed, without ever "coming back" to see if "Single" still equals 1 (that is, until the next tick).

  • Ah, I see. Thank you.

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