dop2000's Recent Forum Activity

    Tried your capx on 2 laptops (both with r246 version of C2):

    New i5-7200U, 8Gb RAM, SSD, Win 10 - project took 3.5 minutes to load, dialogs take 5-10 seconds to open, everything is laggy.

    Five years old i7-3630QM, 8Gb RAM, SSD, Win 8.1 - project took 3+ minutes to load, but dialogs are opening almost instantly, previewing is also fast.

    Looks like you are right, performance is much better on older machines.

  • breflabb

    You'll probably not get any replies here.

    Consider posting your capx in "How do I..." subforum.

  • AJAX On Completed is a triggered event.

    My guess is that when AJAX request with tag "MYLEVEL7" (for example) is completed and at this moment your variable LVL_LOOP is not equal 7, then this event is skipped.

    How many levels do you have? You can simply make something this:

    AJAX On "MYLEVEL1" Completed -> Function call LoadLevelData(AJAX.LastData, 1)

    AJAX On "MYLEVEL2" Completed -> Function call LoadLevelData(AJAX.LastData, 2)

    AJAX On "MYLEVEL3" Completed -> Function call LoadLevelData(AJAX.LastData, 3)

    etc.

  • Containers are easy once you understand how they work. Objects in the container only exist together.

    If one object from the container is created, all other objects from the same container will be created automatically. So you spawn an enemy and don't need to create its head! (but you still need to position it correctly and then pin).

    If you create a head, another enemy will be created.

    You destroy an enemy, its head will be destroyed too.

    If you put enemies and their heads onto the layout in editor and do this out of order, then you may attach wrong heads to wrong bodies! That's probably why all those weird things you mentioned are happening.

    To your second question - PinnedUID is an expression of Pin behavior. When you pin head to the enemy, Head.Pin.PinnedUID contains UID (unique ID) of the enemy instance. (Sorry, I missed the .Pin bit in my previous comment)

    So with this expression you can find the enemy to which the head is pinned using "Enemy -> Pick by unique ID=Head.Pin.PinnedUID"

    or you can find the head using "System-> pick by comparison Head where Head.Pin.PinnedUID=Enemy.UID"

    The third and very popular option is to create an instance variable EnemyUID on the Head sprite. When you create a new Head, you will need to put Enemy's UID to this variable.

    Then you can pick the Head using "Head -> Compare Instance variable EnemyUID=Enemy.UID"

    Or you can pick the Enemy using "Enemy -> Pick by Unique ID = Head.EnemyUID"

    Endless possibilities!

  • Container is the right way to do this. Add enemy and head into a container. When these two objects are in container, each pair of enemy+head instances will be logically linked together.

    If you place enemies on the layout manually in editor, put one enemy and one head first, then copy-paste them.

    If enemies are spawned during the game, you only need to create enemy object, head will be created automatically.

    Same with destroying - only destroy enemy object, its head will be destroyed automatically.

    If you want to do this without the container, you can use PinnedUID expression. Something like this:

    Enemy on destroyed:

    System-> pick by comparison EnemyHead where EnemyHead.PinnedUID=Enemy.UID -> EnemyHead Destroy

  • I've seen your post in C2 forum and I tried your project in both C2 and C3.

    If I look very-very closely to the screen, I can see a few pixels on the right side flickering just a little bit. But it's so minor that I would've never noticed it if I wasn't looking for it specifically. It's definitely not "flickery to the point of unplayability"

    So there must be something wrong on your side, maybe try updating video card drivers?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "CollectableSprite" is your sprite, I don't know how you named it in your project (could be "Coin" or something else).

    ".Count" is an expression, which return the number of sprite instances on your layout.

    Create a variable TotalCollectables.

    Add this event to your "On start of layout":

    Set TotalCollectables to CollectableSprite.count

    Then you can display TotalCollectables in that text:

    System-> every tick -> define text : Player.PlayerCoin & "/" & TotalCollectables

  • Use CollectibleSprite.Count to get the number of all instances of this object on the layout.

    So you can create a variable TotalCollectibles and set it to CollectibleSprite.Count at start of the layout.

  • Something like this?

    For "x"=0 to LayoutWidth/Sprite.Width

    ...For "y"=0 to LayoutHeight/Sprite.Height -> Create Sprite at (loopindex("x")*Sprite.Width, loopindex("y")*Sprite.Height)

    Origin point in the sprite should be at (0,0)

  • Yeah, since you are doing this on start of layout, you can mask this lag using some transition effect.

    For example, put a big black TiledBackground on top, add Fade behavior, set it to fade out and destroy after 1 second, then change your loop to this:

    for x=0 to 9     -> Wait 0.1*loopindex
       for y=0 to 999  -> Set Array.At(loopindex("x")*1000+loopindex("y")) = f(loopindex("x")*1000+loopindex("y"))
    [/code:12uzv96i]
  • Based on the very little information you provided, you might need Anchor behavior:

    https://www.scirra.com/manual/88/anchor

  • I see you fixed that issue with event groups.

    Instead of boolean variable isInteracting, use numeric interactingUID, with default value -1.

    Then change your events to these:

    Grabber interactingUID=-1
    Grabber is overlapping nMask  -> Grabber set interactingUID to nMask.UID
    
    nMask Pick by Unique ID = Grabber.interactingUID
    Grabber is NOT overlapping nMask  -> Grabber set interactingUID to -1[/code:10dl9stx]
    
    When Grabber.interactingUID is set, you can easily pick nMask instance by UID in other events.
dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-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
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies