netdzynr's Forum Posts

  • Can someone explain (or point to a reference) how to set up an oversize background that accommodates multiple screen sizes? For example, the overall game is designed to fit the 4x3 screen dimensions of an iPad but has enough extra width in the background image to fit a 16x9 display.

    Thanks in advance for recommendations.

  • Since buttons can be styled with CSS, you can apply standard CSS glow effects to these controls. Is it possible to apply CSS glow effects to text objects?

  • blackhornet

    Thanks, exactly what I needed.

  • I used to know this years ago... How do I detect a click within a triangular region?

    I want to detect when a click occurs in the red region above, and ignore clicks that occur in the gray. In the past I used a formula, but can't recall what it was.

    (I don't believe Construct ignores clicks in the transparent pixels of an image, does it?)

    Thanks for suggestions here.

  • One way would be to prepare all the colorizable elements of your illustration -- the regions within the black lines -- as separate white sprites (PNGs), with the ReplaceColor effect applied. Then when the user clicks in a "color palette" sprite, store the clicked color value as a global value, and assign this to the ReplaceColor effect of any clicked illustration sprite.

    Depending on the complexity of your illustration, it could be a fair amount of work to position all the illustration sprites in the appropriate positions in the layout, but it should work.

    There may be other options that treat the problem more like paint fills, but I'm not aware of how to do this.

  • Has anyone implemented a paging mode effect using LiteTween?

    This is the iOS scroll effect (UIScrollView) that causes the currently displayed view to shift horizontally (or vertically) by the width (or height) of the view. For example, when swiping right or left, the content scrolls in sync with the drag until the touch is released, and the content is then auto-scrolled the remaining view width, with deceleration.

    https://developer.apple.com/library/content/documentation/WindowsViews/Conceptual/UIScrollView_pg/ScrollViewPagingMode/ScrollViewPagingMode.html

    I'm trying to avoid reinventing the wheel, and am hoping somebody has already put together something like this.

    Thanks in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • WackyToaster

    I would be fully happy using a PNG to mask the menu items. How is this accomplished? As I mentioned, the only way I've seen it implemented is using a blend mode (along with a gradient PNG).

  • WackyToaster

    Thanks for responding. That's a very creative idea.

    Generally, I'm using buttons instead of sprites because I have a bunch of symbol art I'm implementing using custom fonts. Using the buttons/fonts I can apply any symbol at any size, recolor, etc instead of having to generate a separate sprite for each symbol. (I also like the benefit of CSS styling applied to buttons, but see another recent post I made where text-shadow CSS is failing in Construct's export for some reason. Arg.)

    In any event, another route might be to use separate text objects instead of buttons, but the issue still remains: how do I mask (clip) the display of a set of objects? A single object works fine using the Source-In blend mode, but for a group of objects?

  • I want to create a scrolling item menu similar to the bottom row shown here:

    I need to mask (clip) the extents of the menu from being visible (a gradient is used here, but worst case the clipping could be a hard edge). Looking through forum posts, the only way I've seen this done is by using a Source-In blend mode effect on the item/s to be masked. As a test, I was able to create this by applying the effect to a text object and it works.

    However, I want to build the menu using a set of buttons but apparently effects can't be applied to buttons or families. If I apply the Source-In effect to an entire layer, all layers beneath don't get rendered (or at least everything turns black).

    How can I build the above menu using buttons and clip the visible width of the menu to the dimension I need?

    Thanks in advance.

  • I've tried to track down any accessible CSS, but I haven't found any. There's a basic CSS file named "style.css" among the exported files, but when looking through the code of the preview page, all of the button CSS appears to be applied inline. I don't immediately see any way to reference the instanced objects using a central CSS file. Is there some method of doing this?

  • What would cause a Construct CSS style to be ignored or removed on iOS?

    I'm applying a CSS text-shadow style to a button. The style results in a glow effect that renders correctly in Construct's desktop preview, but disappears when previewed on iOS (iPad).

    I know for a fact that text-shadow can be rendered on iOS using a test page here:

    http://i-view.net/test/glow/simple_page.html

    When viewing HTML5 exported from Construct on iOS (or remote previewing), the text-shadow effect is ignored or removed:

    http://i-view.net/test/glow/construct/

    How do I get the text-shadow CSS style to work properly on buttons in iOS?

    [ test project is here:

    https://www.dropbox.com/s/mk69ud1xqeetjrx/glow_test.c3p?dl=1 ]

  • Thanks for the responses.

  • dop2000

    You're right, I neglected to account for replacing the full count of characters.

    justme5555

    dop2000's approach is much more concise, but I updated my project just to have a working version. It appears to work correctly now, same URL.

    https://www.dropbox.com/s/wh9waocnf425h ... d.c3p?dl=1

  • Here's one way: use a function that accepts a string and a number of random characters to replace. The code here references two fields in the sample project so you can test it and see if it works for you:

    Project:

    https://www.dropbox.com/s/wh9waocnf425h ... d.c3p?dl=1

  • Is there some way to pass an object reference to a function?

    I want to create a generic function that, for example, applies an effect to whatever object is provided as a parameter. I'm still trying to get the hang of picking objects and so far I can't find any way to 1) reference a specific object as a parameter of a function call, or 2) enable a function to understand a string-based object reference (as opposed to explicity picking an object type).

    Is this possible?