El Constructorr's Forum Posts

  • ..or you can simply change your two conditions:

    Mouse button is down

    Mouse is on Object (Food)

    to just one:

    On Object Clicked (Food)

    This way, even if cursor goes over another banana, it won't get selected, because now, only "On Clicked" will pick a food.

  • 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.
  • 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.