dop2000's Forum Posts

  • Looks like a bug, try recreating the whole event.

    Or you can do this:

    By the way, you forgot OR in the second condition.

  • You'll need a different cooldownEnd variable for each button.

    If you have many buttons, it will be easier to store their cooldown counters in a dictionary or array. You can add all buttons to a family and re-use the same couple of events and functions for all of them.

  • Try right(text, len(text)-find(text, newline)-1)

  • 1. Is there a reason why DrawingCanvas can not be rotated? I'm guessing it will mess up snapshot functions. But one of the usages of DrawingCanvas is to create "skins" for objects and not being able to rotate it is a big limitation.. Imagine a jigsaw puzzle where pieces can be rotated - this was possible in C2 with Paster/Canvas addon, but there is no way of doing it with DrawingCanvas.

    2. How do I fill an area on DrawingCanvas with transparent color overwriting existing pixels? For example, I need to paste an image onto the canvas, and then make a hole in it. "Fill" actions with color rgba(0,0,0,0) has no effect. The only way I can think of is with blend modes - draw the hole on another canvas, use it as a mask, paste on the first canvas, but it's not very convenient.

  • I would say use Timer behavior, but since you need to switch between layouts, then I guess global variables is a better choice.

    Instead of the boolean, use a numerical variable that will store the time when cooldown should end. For example for 3 seconds cooldown set CoolDownEnd to (time+3)

    To check if the cooldown has ended, compare CoolDownEnd<time

  • I think the only proper way to do this is using an iframe, but it's not a good solution. You can use BBCode to highlight the text and put an invisible sprite on top of it. When the sprite is clicked, open the link.

    Note, that if you have a lot of text, it may be displayed and wrapped differently in different browsers, so in this case I recommend using a SpriteFont.

  • You do not have permission to view this post

  • That's not right: Construct ticks at the speed of the display.

    Is this because Vsync in Chrome/Chromium is enabled by default? So that display refresh rate basically limits the maximum FPS in the browser?

  • You'll need to download GameSparks addon, register your game on their website etc. Search the forum for more information.

    GameSparks is just one option, there are many other services you can use (for example, Firebase), or store leaderboards on your own server.

  • See these links:

    avadirect.com/blog/frame-rate-fps-vs-hz-refresh-rate

    digitaltrends.com/computing/do-you-need-a-120hz-or-240-hz-monitor

    GPU can limit FPS if monitor refresh rate is low and VSync is enabled, maybe this is what the tutorial is referring to.

  • Leaderboards may not be implemented (yet). See this post:

    construct.net/en/forum/scirra-website/website-issues-and-feedback-35/new-arcade-private-beta-145764

    You can use some other service for leaderboards, for example GameSparks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Chroma72 I'm pretty sure that monitor refresh rate has nothing to do with it. It doesn't limit the framerate of your game. If all your other hardware is capable of running the game at 100 FPS, on a 60Hz monitor you will be able to see only 60 frames per second, but the game will still run at 100 FPS.

  • You can use Touch.SpeedAt, Touch.SpeedForID expressions to detect swipes, and Touch.AngleAt or Touch.AngleForID expressions to get swipe angle. Then use a condition like "Is between angles" or "Is within angle" to check if the swipe is closer to horizontal or vertical line.

    Another way is to save Touch.x,Touch.y on touch start in a pair of variables, and then on every tick compare the angle from touch start coordinates to current touch position.

  • You are doing "Guy spawn Guy". What you need is "Window6 spawn Guy".

    Also, a word of advice - use layer names instead of layer numbers. This way if you need to insert another layer at the bottom in the future, you'll not have to update layer numbers in many events.

  • For angles use anglelerp expression instead of lerp.

    anglelerp(firstAngle, secondAngle, dt*n)