Matthew de's Forum Posts

  • Problem Description

    Zooming out on a layer by setting the layer scale value to anything less than 1 causes the screen to flash on start of layout. Values above 1 work perfectly.

    Attach a Capx

    https://www.dropbox.com/s/abjillm9tmfe1fy/Max%20Zoom%20For%20Levels.capx?dl=0

    Description of Capx

    Cycle back and forth through all the levels and the start screen. Levels 2 and 4 will flash upon starting because they have layer scale values below 1. The problem also transfers to the exported project.

    Steps to Reproduce Bug

    • Step 1 System>set layer scale .25 (the screen will flash upon this layer's start when cycling through levels)
    • Step 2 System>set layer scale 1.5 (the screen will NOT flash upon this layer's start when cycling through levels)
    • Step 3 System>set layer scale .75 (the screen will flash upon this layer's start when cycling through levels)

    Observed Result

    The screen flashes when the layer is zoomed out.

    Expected Result

    A smooth transition from level to level when the layer is zoomed in and out.

    Affected Browsers

    • Chrome: yes
    • FireFox: I don't have
    • Internet Explorer: yes

    Operating System and Service Pack

    Mac Parallels

    Windows 7 64 bit service pack 1

    Construct 2 Version ID

    r243

  • Thanks. Actually "layer scale" was what I needed instead of "layout scale".

    After practicing, I was expecting scrolling to change the zoom focal point, but it doesn't. How do I change the focal point for a zoomed layer?

  • Going from level to level I will have large and small puzzles. For each level, how do I zoom in on different sized puzzles so they will fill most of the screen? Each level will have a static zoom.

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

  • Thank you very much

  • [quote:3ax20ofn]sprite animation frame % 0 will equal 0 if even, 1 if odd.

    I'm not sure what the "%" is telling me.

    [quote:3ax20ofn]sprite animation frame = 1|3|5|7|9|11

    In the above example, if the active frame is odd and it returns a result of 1(being true), does "sprite animation frame = xx" ultimately become:

    sprite animation frame = 1

    and if even(false):

    sprite animation frame = 0

    Is this correct?

  • I currently have a line that works perfectly for a similar need that reads:

    sprite animation frame > 0

    I need to change it to something like:

    sprite animation frame = (odd or even numbers)

    I thought this would work but it doesn't seem to:

    sprite animation frame = 1|3|5|7|9|11

    I need it to trigger when ANY one of these odd frames are active. I think what is happening is it is returning a 1 or a 0, so in effect I am saying that if the animation frame is any one of these odd numbers then the animation frame =1. I need it to to trigger on something like animation frame=7.

    Or maybe I am approaching it all wrong.

  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.