Zebbi's Recent Forum Activity

  • When I change the screen mode to "scale outer", my HUD layer is too small, so I want to scale the layer when that mode is selected. Currently on my 1920x1080 res monitor, a figure of 1.333 works well, but if I try it on, say, an 800x600 screen, the HUD is too wide. Is there a way of getting a dynamic scale amount depending on the resolution of the players monitor when I select scale outer? I would have thought ViewportRight would have been useful, but I can't use that in a scale layer expression.

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

    CAPX: https://www.dropbox.com/s/4kdl077zi0pro ... .capx?dl=0

  • I'm pretty sure you need to wait at least one tick before requesting fullscreen again to make sure fullscreen gets cancelled in time.

    Trying that by putting a wait 0.2 seconds between the cancel and the change variable, but it's still not always changing properly to the right scale mode, it seems to do one pass of all 5 scales okay, but on the second pass it stops doing certain ones properly.

    EDIT: Works now!

  • You have to cancel the fullscreen-mode before you switch to another scaling mode.

    Use Browser| Cancel fullscreen before you switch.

    Thanks, that's working now, but it's really hit and miss if it switches. I'm trying to cycle the scales like so:

    Is there a more robust way of doing this that forces a good, clean switch of scale?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Zebbi I'll try to get something up that can be shared in the next day or two when I get a chance. I'll post it in tutorials or something, but I'll let you know.

    Looking forward to it!

  • For instance:

    How can I run a countdown timer into the sprites, with separation marks?

  • Is there a plugin that can live switch the scaling in node?

  • I've also sorted out the max-ammo by using the third column:

    I set the ammo amount in the first condition, and force the amount in column 0 to not exceed the amount in column 2, seems okay!

    Haven't quite worked out if all of this will work when ammo is depleted by firing, I'll find out soon enough though!

  • Solved this here:

  • I'm not certain if I understand correctly what you think to achieve by using an array. An array is useful if you don't want to deal with a huge amount of variables or you need something that change its size dynamically. Also you can go through all elements of an array very easily. A bad Idea is to change the size of an array every tick by inserting or deleting elements. It will have to reorder the index. Depending of the size of the array it could take some time to do this.

    If you store all your Weapons by name or number in an array in the beginning and you want only to cycle through the weapons in the game, you can do this by using the index or use the 'for each element' loop to go through all weapons at once, but I wouldn't use push and pop.

    Excellent, I'm using a global variable to control which column is being shown, so that confirms I shouldn't be pushing and popping. Here's the finished result:

  • Probably something like this to set column 1 to column 0:

    set array at (1,0) to array.at(0,0)

    set array at (1,1) to array.at(0,1)

    set array at (1,2) to array.at(0,2)

    set array at (1,3) to array.at(0,3)

    set array at (1,4) to array.at(0,4)

    ...

    set array at (1,array.height-1) to array.at(0,array.height-1)

    But that just screams "use a loop", so...

    repeat array.height times

    ---set array at (1,loopindex) to array.at(0,loopindex)

    Thank you so much!! I can't thank you enough for helping me with those loops, I've learned a lot from this. Here's the finishing code:

    That keeps a second columns (I changed it around so they're columns rather than how I had it with rows, too hard for me to visualize!) updating and I just update the score like so:

    Works well so far! Any side-effects I might encounter, performance-wise?

  • That sounds like it would work. There isn't really a best way.

    Seems to be working well so far! Is there a way of cloning one column of cells into a duplicate second column? I want to do the old counting counter trick (usually done with two variables, one that staggers the total and adds/subtracts it in nanoseconds until it reaches the sum of the other) but I need to do it with the array, is this possible?

  • I want to have two array columns, one at X=0 and one at X=1, and all 6 cells at X=0 need to duplicate themselves one space to the right. This way, if there's a difference between them (say, a number is added to or subtracted from X=0), I can have X=1 count up or down to the figure in X=0, and the sprite counter will count up or down to match. How do I do this?

Zebbi's avatar

Zebbi

Member since 20 Jan, 2014

None one is following Zebbi yet!

Connect with Zebbi

Trophy Case

  • 10-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

12/44
How to earn trophies