norab's Recent Forum Activity

  • Hi!

    I would want to add value to my "playerDistance" variable, based on distance traveled by the player sprite, on Y axis. I found many threads or tutorials on this question but in my case, all these examples doesn't work because I need upward movements are added, and downward movements are subtracted from the value.

    I'm very new to Construct 2 and I still don't know the expression i need to type in "add value" so that the value is based on movements of a sprite.

    I hope my topic is clear

    Thanks for reading and/or help!

  • This is it!

    I fixed my problem by using "key is pressed" instead "key is down".

    Thanks for your help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for your answer, but infortunately the problem is still there. If I set "validate" to 0 before instance is created, instance is just not created, and if i do it after instance creation, it still create several intance instead of only one...

  • Hi,

    My goal is: when you press the left arrow key, an instance is created randomly to one of two specified positions.

    I use a global variable and a local variable. The global variable defines the left arrow key has been pressed, and the local variable is used to choose one of two positions.

    I added a "reset global variables" event. Despite this, it seems that the time between the change in value of the variable and reset is long enough to create multiple instances instead of one. I do not understand why.

    Here you can download the if you want to take a look.

    [www.norab.fr/images/reset_test.capx]

    Thank you for taking the time to read my rough english.

norab's avatar

norab

Member since 20 Jun, 2015

None one is following norab yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies