tenemide's Forum Posts

  • 8 posts
  • j'aimerais ici créer un bon groupe d'entraide et de dev , sous construct 2, on a tous eu un jour le souhaits de trouver des alliés, alors n’hésitez pas ..

    je dev depuis prêt de 5 ans: notamment du multi player, mais aussi je connais pas mal de base qui pourrait vous être utile.

    je ne sais pas tout .. Unissons nos Forces!!

    OrnyFull

    Salut, il y a la communauté "Construct-French"

    http://www.construct-french.fr/

  • "For" is inclusive, so it will run from 0 to 1000 if you use 0 to Array.Width, that's why you need 0 to Array.Width-1.

    Hi Blachornet

    Yes you are right, I have trying with Array.Width-2 and the latest value is 0.

    Thank you very much to help me, master

  • Use floor(random(0,Dictionary.KeyCount)) or floor(int(random(0,Dictionary.KeyCount))) instead and see what happens.

    Are you sure the dictionary is well filled and the keyCount is returning a valid value?

    Again,

    I want to understad Why "random" is not working without floor. My first think is because the "random" use decimal value, isn't it ?

    Thank you to help me to understand better my error.

  • Your loop should be from 0 to Array.Width-1 also.

    Thank you for your comment. The Array.width is 1000

    If I use "Array.Width-1", I have 0 to 998 so 999 values in X (Debug layout). But in my case I want to have 1000 values exactly (0 to 999).

  • Use floor(random(0,Dictionary.KeyCount)) or floor(int(random(0,Dictionary.KeyCount))) instead and see what happens.

    Are you sure the dictionary is well filled and the keyCount is returning a valid value?

    /i]

    Hi Josek5494

    Yes Great! The "floor" is exactly what I need, now it is working properly.

    So many thanks!

  • Hello Everyone,

    I am confusing, I need to Set a random value on a local variable inside a loop "For", but is not working.

    https://www.dropbox.com/s/mwykbtzsagu3cgn/test.JPG?dl=0

    When I put a constant value or I add the value, it is working. but, when i want to use "random" it is the 0 value returned.

    I hope you can explain me what is the problem

    Best regards

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Rojo,

    Nice, I tryed your plugin and it work well. With this, I think that I can found a way to create the expected effect.

    Many thanks

    Best regards

    Tene

  • Hello,

    I try to found a solution to create a sprite and to fill it with a picture inside a mask on other Sprite. Is not easy to explain, please take a look on the picture attached. So times a draw is better than words

    If you have somes ideas to process it ?

    Thanks

    Tene

  • 8 posts