dop2000's Forum Posts

  • The original tutorial recommends creating a transparent playerBox to handle collisions.

    It's still a preferred method. You can position Player sprite to playerBox on every tick, or pin it once on start of the layout. The only problem with Pin is that it updates player position at the end of the tick. So, for example, if you are using image points on Player sprite to spawn bullets or to attach weapons, with Pin there may be a small lagging effect.

    an issue where the enemies don't collide properly with the edge barrier and end up falling to the bottom of the screen

    This may happen if the enemy's collision polygon is not symmetrical (relatively to its Origin point), or if it has animation playing with different collision polygons. What happens in this case is the enemy collides with the barrier, turns, collides again and turns again.

    See this file demonstrating the issue:

    dropbox.com/s/ac9suehzb8pcowy/PlatformEnemies.c3p

  • If your current export is, say, 100MB, it will only significantly grow in size if you add more assets to the project - images, sounds, big files. Other things like the amount of code, plugins used etc. are negligible.

  • You may have a wrong version of plugin installed. Try plugins from this file (uninstall previous version first!)

    dropbox.com/s/mca7fkjbxqs8vkw/litetween_C3.zip

  • It's easier to use BBBox** expressions.

    dropbox.com/s/cxojv9oqh15f870/Dragging%20Precise%20Collision2.c3p

  • I tried that C2 Barrel effect, and it basically works like Bulge - distorts on both X and Y axes.

  • Rotation expression starts at 0 even when you set offset angle to 200. So you can use it like this:

    Variable counter= -1
    
    Compare two values: Sprite.Orbit.Rotation<5
    Trigger once
    	Add 1 to counter
    

    Nepeo , An integer OrbitCount will have a limited usage. I think an expression like DistanceTravelledInDegrees will be more handy. So, for example, if you need to stop after 1.5 rotations, you can do DistanceTravelledInDegrees>=540

  • There was such effect for C2, but download links are dead:

    construct.net/en/forum/extending-construct-2/effects-31/effect-barreldistort-98810

    newt, you commented in that post, do you still have the files? Should not be difficult to convert for C3.

  • You can use unixtime expression, it's the number of milliseconds since Jan 01 1970

    int(unixtime/1000) is the number of seconds.

    int(unixtime/60000) is the number of minutes and so on.

    If when user opens the app unixtime>(yesterdaysUnixtime+86400000), this means that more than 24 hours has passed.

  • if fGravity's water state is set to "active" then the error will commence.

    Then I think, the problem must be in some other event, where you are picking fGravity with "active" state and doing something with them.

    .

    Yeah, if you are filing a bug report, you need to attach a small project, not your full game.

  • You need a way to link flowers with pots. For example, create an instance variable "flowerUID" on Pot family. Set it to correct values for each pot.

    When Pot is clicked, pick Flower instance by unique ID = flowerUID, and then change its animation.

  • Are you saying that if you disable this entire event, the problem goes away?

    Try to narrow it down even further - remove "Pick fWater" subevent, test, then remove "For each fGravity" line, test.. Maybe you could find the exact condition or expression that causes the game to freeze.

    Also, why are you setting waterUID to ""? If it's a numeric variable, it should not accept string.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry, I may have misunderstood your question. See this new demo:

    dropbox.com/s/qmax8i9vg3y0uux/ColorOverlay2.c3p

    The color starts to change as player gets close enough to each color square. If you need to change the color constantly, calculating an average R+G+B color in any given position on the layout, this will require some more math...

  • If you look at my example, there is a disabled event 1, where I tried to fade from red to blue overlay. If you enable it, it happens pretty quickly immediately when you run the app.

    So the idea is when your character is getting close to some object (or starts overlapping it), to set target overlay color and then change R/G/B values of the layer over time to that color. As in my example, R is changing from 100 to 0, G stays 0, B changing from 0 to 100. You can use lerp, tween or any other method.

    There are probably other ways to do this. You can create several layers like that and change their opacity over time, making one visible and another invisible, or even mixing them together.

  • You can add "Wait 0 seconds" seconds before changing the variable.

    Another option you can try is to reverse the order of groups - put group Stage6 on top, then Stage5 and so on.

  • random(1,6) returns a number with decimal point, like 2.2947030939

    If you need an integer number use these expressions:

    int(random(1,7))

    or

    choose(1,2,3,4,5,6)