Zebbi's Forum Posts

  • Zebbi , my example above doesn't work for you? Or am I misinterpreting something, English isn't my strong suite!

    Whoops, missed that! Thanks for that, I've replaced charcode with that (no need for extra plugins if not essential )

  • >

    > > You should be able to get the scale with: windowwidth/originalwindowwidth

    > > It most likely won't work the way you'd want it to, though..

    > >

    > LittleStain Well, it's a bit bigger, but it doesn't reach the full length. Does it need some sort of clever calculation that figures out the users aspect ratio and divides the height in or something?

    >

    I'm sorry, but I don't think I can be of any further help on this topic..

    You'll have to re-invent the wheel yourself, or use the one that is already available..

    I gave you a link to a working example of one way to do the scaling and I guess that's all I can do..

    By the way, you should really adjust the origins of your sprites in the hud example capx..

    Also, adjusting the settings of the anchor behaviour is ofcourse nescessary for it to work..

    Thanks for your help so far, LittleStain so it may be possible to do this for all of the HUD elements with anchoring?

  • You should be able to get the scale with: windowwidth/originalwindowwidth

    It most likely won't work the way you'd want it to, though..

    LittleStain Well, it's a bit bigger, but it doesn't reach the full length. Does it need some sort of clever calculation that figures out the users aspect ratio and divides the height in or something?

  • Sorry to bump an old topic, but this looks like a great way to add 3D to games that don't need lots of 3D, just the occasional object, and thus keeping webgl to a minimum. What kind of requirements would it take to implement this in c2?

  • >

    > Aww and there I was thinking it was perfect What problems does it produce?

    >

    Well, have you tried pressing "Shift", "Enter", "Ctrl", the arrow keys, any of the numpad keys...? Either nothing happens, or totally incorrect characters appear. There are also differences between browsers, in Firefox, pressing "Shift" produces a graphical element but on Edge and Chrome nothing happens.

    I haven't checked it thoroughly, but the default "Keyboard" Plugin seems to be a lot more predictable and functional. It just doesn't register "Spacebar" as a string. But this can be easily implemented with an extra event.

    How do you convert character codes to actual characters with the keyboard plugin?

  • I've found this function to be invaluable for dealing with asynchronous problems arising from LocalStorage:

    It means I can stick these anywhere I want in the event sheet and it will act effectively as a Start of Layout condition, but without all of the key/value checks cancelling each other out but happening at once. Seems to work for me, is there any reason why this shouldn't be used as a valid way of processing multiple localstorage checks at the start of a layout?

  • In order to load it you need to do all three steps shown in here: https://www.scirra.com/tutorials/1461/h ... age-plugin

    On event > Check item exists

    On item exists > Get

    On get > set

    Justr trying to get the hang of localstorage, seems the "get" step is no longer necessary?

    [quote:vu1jqgfd]Note #2: Thanks to an user comment. It isn't necessary to call 'Get Item' on 'Check if item exists'. So you can use 'LocalStorage.ItemValue' directly in the 'Check if item exists' event.

    So we can just On event > Check item exists > On item exists > set

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As you have already noticed, using layerscale doesn't give you the results you expect..

    LittleStain mainly I would imagine because I haven't worked out how I could calculate how to dynamically resize a layer with a visual width of 640 to whatever monitor resolution the user is using. If I knew how to get that figure, it might give me the results I expect?

  • ***Layout***, not Layer.

    Thanks, works perfectly, haven't used layout effects yet, sorry!

  • You can add Sepia to the Layout.

    Okay, so I've put this on a layer on the very top of the layer stack, how can I make all layers underneath be affected by the sepia?

  • >

    > > Is there really a reason to re-invent the wheel?

    > > The right combination of the anchor behaviour with paralax 0,0 works with any fullscreen setting..

    > >

    > > https://dl.dropboxusercontent.com/u/485 ... nchor.capx

    > >

    >

    > LittleStain Thanks for the example, here's a new one with a mockup HUD for this exercise, https://www.dropbox.com/s/g4curnknsl789 ... .capx?dl=0 - if you press S to change the scaling, you'll notice it's not wide enough. I doubt I could use anchors to keep everything correctly sized on that change of scaling for this type of HUD?

    >

    I doubt you could too..

    I don't doubt it could be done, though..

    LittleStain So, would creative usage of anchoring be best for this example I've given, or could things still be resized with some sort of layer scale?

  • I can't see a shader that's available to "greyscale+tint brown" the entire game, like a classic western movie. Is this possible at all?

  • Is there really a reason to re-invent the wheel?

    The right combination of the anchor behaviour with paralax 0,0 works with any fullscreen setting..

    https://dl.dropboxusercontent.com/u/485 ... nchor.capx

    LittleStain Thanks for the example, here's a new one with a mockup HUD for this exercise, https://www.dropbox.com/s/g4curnknsl789 ... .capx?dl=0 - if you press S to change the scaling, you'll notice it's not wide enough. I doubt I could use anchors to keep everything correctly sized on that change of scaling for this type of HUD?

  • >

    > > Setting the scale of the layer to such an enormously high number isn't what you are after..

    > > If you set the width of the bar to viewportright()-viewportleft(), however..

    > >

    > Yes, that would work, but I need not just that bar but the other items on the layer resized too, all of the score and life and health numbers. 1.3 isn't enormously high for a layer scale, it's only a third(ish) bigger. Can I scale a whole group of items so they're exactly the same relative size? If not, that's why I wanted to use a dynamic layer scale figure depending on the resolution of the players screen.

    >

    Why would you use layer scale?

    Everything does get scaled automatically..

    You didn't want to scale the bar, you wanted to stretch it, that's the difference..

    LittleStain No, I want to scale it, retaining the correct height as well for the bar, I could mock up the bar with some counters and text on it to make it appear more like an HUD if you need? If I stretch the bar, it would look odd when it has HUD items on it, and I would need to get those stretched too, which is why I need it scaling to the right width whilst retaining the correct height. I need the correct height to be retained when the width is met with the side of the screen. I can't see why scaling the layer would be the wrong way of doing this?

  • Setting the scale of the layer to such an enormously high number isn't what you are after..

    If you set the width of the bar to viewportright()-viewportleft(), however..

    LittleStain Is there a way of scaling a group of items so they relatively meet the correct width? Like I say, the bar will have many other items on it that need to be scaled relatively, which I was I was scaling the layer.