El Constructorr's Forum Posts

  • Hi. My loading animation is just a nice sequence of rotating dots in a loop, at loader layout.

    So at loadingprogress = 1, I am restoring a couple of dictionaries from LocalStorage, which is why (I assume) my loading animation gets stuck for like a second, before going to the next layout.

    Is there any way I could perform all the dictionary/LocalStorage/json commands in parallel while my loading animation keeps animating smoothly? because that's the point of loading animation right.

    Please help. Thanks!

    Tagged:

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Both above solutions will work.

    The way I would do is simply use the 'max' system expression.

    hp = max(0, Hero.damage - Enemy.Defense)

    this way, it will take the maximum value from the two parameters. Which means, when the subtraction goes negative, it will choose 0 as hp.

  • Condition: Sprite (that has the tween): On "" tween end: Set isActive false

    Go to that sprite conditions you'll find the Tween conditions as you want.

  • What I would do in your situation (i.e. not having to change a lot, and fix the problem):

    1. Instead of calling a function that starts the while loop, keep that loop in a separate Group (default: inactive). So, instead of calling the function, just make the Group active.
    2. Instead of using While loop, use simple conditions (if conditions). That way you can have your 0.1 wait and update progress timely as everything else progresses in the game. Won't get stuck. No while loops.
    3. Make the group Inactive at the end of that loop, or when progress bar has reached end.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dop2000 I believe we can.. just have to map the function(s) first.

    nettemple srv-file7.gofile.io/download/SfFQ5K/mapFunction.c3p

  • You will have to do this mathematically.

    It should look something like this:

    Set X to: choose(100, 200, 300, 400) + background.X % 100

    Set Y to: choose(100, 200) + background.Y % 100

    You may have to experiment there a bit, unless that works perfectly in the first go.

  • Yes there is an easy way.

    Animation.speed = -20

    Basically just have a negative speed, it will animate in reversed.

  • Easiest solution would be simply:

    Call Function: choose(func1, func2, func3, func4)

    If you have a lot of functions, then:

    Call Function: "func"&str(round(random(1,100)))

  • You do not have permission to view this post

  • Just before Go to Layout, add an action Wait for 2 seconds.

  • Of course you're confused, your avatar pic says it all.

    But, what seems to be wrong? The video preview shows correct changes in readings and you tested them all well. And it worked well, didn't it?

    So now you know what each of them say, how to reset them (in the beginning if you have to), and it can detect where the phone is tilting exactly.

    Except, two problems: the Beta -179 goes to plus 180, suddenly which can cause problems if you're performing actions relative to Beta values... The sudden jump. But it can easily be resolved by some math. Search on this forum you'll find many similar problems and solutions.

    Second, if you're worried about the sudden wrong readings due to spikes and jerks, you can easily eliminate that by 'easing' out the values. i.e. Instead of showing "exactly" what it the sensor reads, let it gradually go towards the value, which helps in filtering wrong values in between (i.e. jerks).

    You can do that by using the 'lerp' function... Look it up.

    Example: alpha_value = lerp(alpha_value, Touch.alpha, 0.4)