dop2000's Recent Forum Activity

  • I'm not sure about the jittering and collisions, but a bigger problem with your dashing system is that you can't dash to the left.

    Try this:

    Make sure to disable "Set angle" for the PlayerBox on all layouts. You don't want to rotate this sprite, because it has Platform behavior.

    At least this should allow dashing in all directions.

  • I can't see the gif, could you post the direct link to it?

  • It's hard to tell by that screenshot what is wrong. Try clearing the canvas to some color, for example blue - grba(0,0,100,100). This way you'll see where it is. Also, like I said, pasting is not instant. You need to wait before destroying the pasted sprite. Try adding Wait 0.1s after Paste action.

  • To paste an object onto Drawing Canvas, it needs to be on the Drawing Canvas, or at least partially overlapping it. So you need to move the canvas to the object position, or move the object to the canvas position. Then paste, then return back.

    Alternatively, you can create a copy of the item (another sprite instance with the same animation) on the canvas. Then paste it, then destroy that instance.

  • If you can reproduce this issue, you should file a bug report:

    github.com/Scirra/Construct-3-bugs/issues

  • I really don't like "Trigger once" condition and rarely use it. It seems innocent and convenient, but in reality it often causes nothing but troubles.

    I suggest using a boolean variable instead.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Something like this:

    SelectIcon is overlapping Family
    .. Canvas set position to (Family.BBoxLeft, Family.BBoxTop)
    .. Canvas set size to (Family.width, Family.height)
    .. Canvas paste object Family
    

    Note that pasting is not instant, you need to wait a tick or two before removing the sprite or the canvas.

  • I don't know your game, so I don't understand what's going on in that gif..

    Did you try the things I suggested in my previous comment? If you draw something else on the canvas, can you see the canvas object?

  • Because Repeat calls the function every tick, if I understand correctly, and the loops overlap each other.

    Yes, any condition runs on every tick, unless you put it inside some triggered event or a function.

    I assumed you would use my code inside "Enemy on created" event or something like that.

    The code in your last screenshot is too complicated and possibly buggy, especially with multiple enemies.. You should either create all waypoints for the full path in one go, or use "On arrived" trigger to move to the next point. I also suggest using Timer behavior instead of "Every x seconds" and "Waits" - it gives you much more control and you can run different timers for each enemy instance.

    For example, if you you need an enemy to move to point A, wait 1 second, move to point B, wait 3 seconds, then you should use this sequence of events (in pseudocode):

    On created: Move to A
    On arrived to A: Start timer "moveToB" for 1 second
    On Timer "moveToB": Move to B
    On arrived to B: Start timer "patrol" for 3 second
    
  • I can agree with #1 and to some extend with #2, but #3 is definitely unrealistic and will not be compatible with the current expression structure.

    I would suggest posting 3 different ideas, to allow people voting for each idea separately. Ashley has repeatedly asked not to put multiple suggestions in a single post.

    • Post link icon

    XHXIAIEIN Large images - no, large layouts - yes. But I don't see how this can explain the random nature of the problem. I can be working with events for an hour without any lags, and it would suddenly freeze for 20 seconds when I enter a new action or edit a comment.

    1StepCloser I can try, but my other laptop is very old and low spec. It will probably be just constantly slow.

    Asmodean Thanks, I didn't know about the task manager in Chrome. It doesn't show anything useful though. During the freezes the CPU value for Construct 3 tab jumps to 100-150. But nothing else changes.

    Windows Task manager only shows a small increase in CPU usage for Chrome - from ~3% to 6-7%. There are no spikes for other apps or services.

    Jase00 I managed to force Chrome to use my Nvidia GPU. The editor did feel a bit faster overall. But it didn't fix the occasional freezes unfortunately.

  • Never use "Trigger once" with multiple object instances, it will not work correctly! If you want to execute some code for an Enemy instance once, you should use state variables, for example create isReloading instance variable.

    There is another issue - once you picked an enemy with no ammo, you can't pick another instance (its teammate) in the same event. A common solution is to use a family. Add Enemy sprite to EnemiesFamily and then you should be able to do something like this:

    Enemy Ammo<=0
    Enemy isReloading=0
    . EnemiesFamily Pick nearest to (Enemy.X, Enemy.Y)
    .. Enemy Set isReloading to 1
    .. Enemy Pathfinding Stop
    .. Enemy Find path to (EnemiesFamily.X, EnemiesFamily.Y) 
    

    I also recommend running this code in the same event where the enemy fires a bullet. This way you will be saving resources because it will not be running on every tick, and it will only execute for a single enemy instance.

    When reloading is finished, set isReloading to 0.

    There may be other complications. For example you probably don't want two enemies with no ammo to run to each other. So you might need to move isReloading instance variable to the family level. And when picking a teammate check that it's not reloading.

    Also, the available teammate may be too far away, or there may not be a clear path to it - you should consider these things too in your code.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 279 followers

Connect with dop2000

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies