Matthew de's Recent Forum Activity

  • Wow, that's the exact answer I was looking for! I did always assume that the array fields were completely empty and now it makes perfect sense.

    Thank you everyone who help me figure this out.

  • I actually got the floor(Random(1,6))*2 working with subtraction. So I am able to achieve the result that I wanted.

    However, I am still puzzled why choose(0,2,4,6,8,10) will not work for me. At this point I am just trying to understand the limitations.

    You can see in the capx provided. Toggle between the two choose options to see the difference.

    https://www.dropbox.com/s/jprcxp4vwn3iuo1/RandomNumbers.capx?dl=0

  • Where am I multiplying zero by zero? The only multiply I can see is, floor(Random(0,6))*2.

    I can't get choose(0,2,4,6,8,10) to work either, I just want it to be able to pick the zero and give it to me.

  • [quote:3io59dhr]0 multiplied by 0 is 0

    That's okay, I need a single 0 as one of the results.

    When the tutorial program is run, it locks up without displaying the results like normal. Same thing with choose(0,2,4,6,8,10). It will not give me a result. If i swap out the 0 like choose(1,2,4,6,8,10), it works, but no zero. I can get this to work though, choose("0","2","4","6","8","10").

  • I actually woke up this morning with a solution immediately in my head. I should have used CHOOSE instead of RANDOM in this case.

    I am now having difficulty with getting it to work with the number zero though...

    This works:

    floor(Random(1,6))*2

    or

    choose(2,4,6,8,10)

    But this does not:

    floor(Random(0,6))*2

    choose(0,2,4,6,8,10)

    The crazy thing is, when I make some changes to allow text instead of numbers it works.

    choose("0","2","4","6","8","10")

    Even though the numbers were entered via text, will this cause any problems? Should I just go with this?

  • I think Tom's tutorial will work the best for me.

    However, I am actually needing to randomly select from a specific set of numbers instead of 1-6. I need to use 0,2,4,6,8, and 10.

    The tutorial sets the range like this...

    System - Set RandomNumber to floor(Random(1,7))

    How can I randomly use my specific numbers instead of a range?

  • Perfect! That is exactly what I needed!

    Thank you

  • I am wanting to create an array that has shuffled numbers in 6 different fields. I know how to choose a random number, but I don't know how to use that number only once.

    This is what I am trying to achieve.

    R = 4

    O = 1

    Y = 3

    G = 2

    B = 6

    V = 5

    R = 1

    O = 5

    Y = 4

    G = 6

    B = 2

    V = 3

  • I am using Comic Sans MS.

    I have exported to Bitballoon.com to run the HTML.

    Firefox seems to work properly but the font placement is slightly shifted and does not display the same as it does in the preview.

    My C2 preview browser is Chrome but running the exported file through Chrome and the bitballoon hosting site, it reverts to Ariel font.

  • When I export to HTML5 the font style does not carryover. The game displays Ariel font instead of any font of my choosing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah, yes, something else was wrong. I was having the global variable reset too early.

    Thank you

  • For some reason the system doesn't allow me to use a global variable in addition to the 2 ranges as shown above.

    When I try:

    set value at (SelectedPlayer,loopindex("Players"),loopindex("Stats")) to 0

    It does not work.

    When I try:

    set value at (8,loopindex("Players"),loopindex("Stats")) to 0

    It does work.

Matthew de's avatar

Matthew de

Member since 29 Apr, 2016

None one is following Matthew de yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies