Keeps on looping my actions

0 favourites
  • 4 posts
From the Asset Store
6 looping tracks to use in your games and projects. These tracks are in the style of the 1960s detective movie genre.
  • Hi all,

    I've got a lack of basic knowledge i find out now..

    First i will explain what i am doing.

    I have a script that:

    Checks if a object is close to a point where it has to be ( player is draggin it ). Once on drop it will check if it is close to that point.

    If yes it has to put score -1, disable drag and drop and set a position.

    This all worked perfect, but not my score.

    My score is looping the -1 :-(!

    How it looks now:

    <img src="http://s14.directupload.net/images/131028/37rnuy7b.png" border="0" />

    Im checking my globals if the position is almost correct. If yes it will do the actions.

    So.. I am showing my score with: Every tick > Set "text" to "pieces". ( pieces is my score global )

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I cant see your entire capx so I am not sure, but this is a suggestion on something you can check.

    From the tiny bit you of actions you have shown there is nothing stopping it from going into that condition many times. It depends on if the position you are setting is a whole different location, then my comment is invalid. But if the location you are setting is still below the distance of the 16 then you will keep on deduction 1 from pieces.

    If the above is a correct assumption you need to add another condition, could be a check for if dragDrop is disabled, or your could set a variable on the p92 object that it has the right position.

    From what you have shown me that is my best bet. If that does not help, I would need some more info to be able to help you.

    Hope it helps.

  • your conditions are true every tick, so every tick the variable is reduced by 1.

    add an is dragging condition would help because in the actions you disable the drag and drop, so it's only true once.

  • add system: trigger once while true as condition and it will only activate once

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