GeometriX's Forum Posts

  • You had a few logic issues and inconsistencies, so I've uploaded a fixed up version with comments so you can see some general improvements on your code.

    The actual issue was that you weren't converting your WebStorage.LocalValue("HighScore") from a string to an integer, so it couldn't be compared with the global variable TotalDistance.

  • Included event sheets are always read first, regardless of where the Include event sheet code is used in the event sheet. They are, however, read in the order that they're called in the "parent" event sheet, so there is certainty that can be relied upon.

  • Chromium will also blacklist the accelerated canvas2d on some device, e.g. the older Qualcomm Adreno device, see the link crbug.com/161575. To confirm the gpu feature status on your device, I suggest to use Chrome for Android for help, you can type about://gpu to check the output for Canvas category.

    Hi hmin, I'm currently in the process of moving over from CJS to Crosswalk, and I came across this issue. What is the resolution process for this bug? Is this something that you guys deal with on your side, or is WebGL just never going to work with Crosswalk on a Galaxy S3 due to a driver bug that's beyond your control?

    I understand that blacklist ignoring is something that's coming up soon in Intel XDK. Will it be safe to simply ignore blacklistsed GPUs to ensure WebGL works? I've been testing on my GS3 using Cocoon for some time now (with WebGL enabled), and it's always behaved itself fine.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's not a bug. You need to set the layout's "unbounded scrolling" property to "yes".

  • This issue has come up before (and was not resolved) but I've been able to consistently reproduce it on my side, so I figured I'd post an official bug report.

    Problem Description

    What happens is any SpriteFont object that has the Tint effect applied will exhibit strange stretching glitches in the layout view (runtime is fine). This only applies to multiple instance of the object - the first instance works as it should.

    As the user pans around the layout view, the stretching warps and twists. It makes it quite difficult to work with text in this way.

    Attach a Capx

    Attached

    Description of Capx

    Just open the file and it should look wonky.

    Steps to Reproduce Bug

    • Create blank project with WebGL enabled.
    • Create SpriteFont object, drag out multiple instances of it.
    • Apply the Tint WebGL effect.

    Observed Result

    See attached image "text stretched"

    Expected Result

    See attached image "text normal"

    Affected Browsers

    N/A

    Operating System and Service Pack

    Windows 8.1

    For reference, I'm using an AMD HD 7950 with driver version 13.251-131206a-166151E-ATI

    Construct 2 Version ID

    R169

  • In my experience, functions work 100% in CocoonJS, but there are a number of things that don't work. Check the tutorial (possibly outdated - a few things have changed since it was written) for more details.

  • First, give the sprite the Tint effect, default settings make it red. Then, at the start of the layout, disable the effect.

    Next, give the sprite the Flash behaviour.

    Now create a function that you'll call whenever the player is damaged. In that function, set the tint active, then start the flash behaviour, then wait a period of time, then set the tint inactive.

    I've attached a quick example of this in action.

    Note that this uses a WebGL effect, so this won't work if there's no WebGL support on your target platform. If you want to be absolutely rock-solid, then you might have to create new sprites with the red tint already applied. Flash will work regardless, though.

  • There's actually a version of the Ghost Shooter demo included with Construct that has that exact feature. You can find it on the list that pops up when you create a new project. It looks fairly complicated but if you break down the events one bit at a time you should figure it out.

  • Oh, that's quite interesting. This seems to be caused by the fact that you're using the object->spawn action as opposed to system->create. Spawn seems to specifically pick the current instance as the spawner, rather than the spawnee. Create picks the spawnee as the current instance.

    Here's an example of the two different events in action.

  • Setting up the parameters of an object in the same event in which it's created definitely does work, but you have to be in exactly the same event or a sub-event. If you're trying to do it in a parallel event (if the creation and parameter defining actions are both separate sub-events of another event), then Construct will reset the picking and default to all instances of the object. Picking is always reset as soon as you step up and out of an event.

  • I'd say the absolute easiest way would be to have the control groups disabled by default, then run an event on startup that goes something like this:

    Text > Set Text ("3")

    Wait 1 second

    Text > Set Text ("2")

    Wait 1 second

    Text > Set Text ("1")

    Wait 1 second

    Text > Destroy

    Set control groups enabled

    Not elegant by any means, but totally functional.

  • I suggest that you take a step back, learn and understand fundamentally how picking and events work and how containers and/or families will help. Then try to rework your game logic using that knowledge. There's little point in throwing a bunch of new ideas at wonky code unless you understand those ideas.

  • There are loads of threads about this exact topic. Just do a bit of searching on the forums and you'll see this question has been addressed many times before.

  • Because the logic is wrong. The "container issue", as you call it, is at the root of the problems.

  • Here's a quick example I put together to illustrate the difference between events referencing objects in containers, and those not in containers. Hopefully it'll give you a clear visualisation of what's going on inside your game.

    Also worth noting is that objects in containers are automatically created at the origin of their "parent" objects (although containers are actually flat and not in a hierarchy, they can still use root objects to create the rest of the container objects). Otherwise, if those objects already exist, they are paired according to the order in which they were placed in the layout.