winstreak's Recent Forum Activity

  • After looking at the math you just find the longer distance between vertical and horizontal. Whatever the shorter distance is, gets used up with diagonal steps.

    Find difference of X of current and X of chest then compare if its greater or less than Y of current Y of chest. If greater int((x/32)+0.5) or round(x/32)

  • It works but it’s not very exciting.

    You get the max points with just 6 plants down with no reason to harvest them.

  • Floor and int work the same in construct - they both floor.

    I would guess you’d need 2 equations. 1 for how many’s diagonals you would have to take, then add how many straight squares.

    If you’re 8 up and 3 to the right you would solve for 3 diagonal steps then 5 straight.

  • The way you started your code, even if done correctly, would only work for abobora & Cenoura - Squash and carrots I think.

    You would then have to check if you have carrots and raddish and then Squash and Radish and then cabbage and squash, cabbage and raddish..... so it becomes a lot.

    You want a way to check is there at least one animation on squash, if yes add 1.

    Not sure if there is a build in function but you can set a global to 0 every tick, then add 1 if there is atleast one of each type.

    Like with mine, only instead of saying the number I have you set your animation based on it.

  • Never worked with touch, but I assume it works the same as click events.

    Which means: Since construct runs the code top down you are clicking to switch your animation from 0 to 1, then it will be playing animation 1 and switch it to 2 then it will instantly see it is playing 2 and switch to 3. This is most commonly fixed with else statements:

    If you want further information on the topic I created a video a while back that explains it in more detail:

    youtube.com/watch

  • One way is by setting the collision of the Square you want to check what squares are around it to be larger than the actual image. Then check what it's overlapping.

    I have a short video that works with this idea:

    youtu.be/BIoVQBCXtI4

    You would want to change your collisions to only hit top right bot left though like this:

  • No worries, you will never get good enough where mistakes like that don't happen. You will get better at finding them though :)

  • Set that to deactivate

    :-P

  • No worries with spawn, that's not causing the issue.

    Do you have anywhere else in your code where you set Bullet angle or set Bullet 'bullet' behavior angle?

    It seems like what you showed me should work fine, but I can't see the rest of your code...

  • It looks like every .2 seconds if your left click is down you are setting all your bullet angles.

    I never used spawn object (Only ever Create object) but it should work the same. On the Left button/Every .2s Condition Remove your 3 set bullet angles.

    Create a new condition. Bullet on created - Add the 3 set bullet angles.

    This should set the angle one time - one creation - then ignore when setting for new bullets.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sure thing Shanjei, glad I could help.

  • You do not have permission to view this post

winstreak's avatar

winstreak

Member since 4 Dec, 2019

Twitter
winstreak has 11 followers

Connect with winstreak