dop2000's Recent Forum Activity

  • Your code is over-complicated. See this example:

    dropbox.com/s/mg6fdqs4e7g680v/CreateButtons.c3p

  • AllanR Your example is much more refined, although 22 events is probably a bit too many :)

    I guess it can be done even easier if instead of creating sprites in runtime, we put them all on a global layer in the editor, add an instance variable "Delay", set different delay values for different columns. And then simply start tween for each instance after a delay. Should be just a few lines of code.

  • I must say, I don't understand your code.. Why do you need ButtonNameDisplayLoop variable? It's local and not static, so it will always equal 0 when you call this function.

    Also, if you need buttons to be created in a horizontal line with 104px intervals, you need to pick the last button (rightmost), and then add 104 to its x-coordinate. On your screenshot you don't pick any button instance, so the first instance will be used. If you need to create more than 2 buttons, this will become a problem.

    Then, when you are creating a new button, you have ButtonNameDisplayY+72 as X coordinate, is this a typo, shouldn't it be ButtonNameDisplayX+72?

    Finally, you don't need the last event (pick instance by UID), you can set text right after you create the button, in the same event.

    .

    I suggest you carefully review your code, fix the issues, and use Debug Mode if there are still any problems.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Up!!!

  • Here is my version:

    dropbox.com/s/aarikmq8v8l72ax/DiamondTransition.c3p

    I'm using a global sprite on a global layer, which is not destroyed when you switch to another layout.

  • I believe the default audio format in C3 now is webm. If you re-import all sounds from wav, they will be converted to webm.

    See this article:

    construct.net/en/blogs/construct-official-blog-1/opus-audio-construct-891

  • Instance variables have a number of advantages over global variables, there is actually a plugin for that, take a look:

    construct.net/en/forum/extending-construct-2/addons-29/plugin-globals-120736

    .

    You don't have to use a sprite object on a global layer. You can use a dictionary or an array (they are set as Global by default), and define instance variables on them! For example, with PlayerStats array you can store some data in the array itself, plus you can have "health" and "speed" instance variables for easy access - for example "Set PlayerStats health to 100"

  • You need to have one default instance of this SpriteFont on any layout. I usually create an unused layout "Assets" and keep all such instances there.

    Also, try running the project in Debug mode and see if the instance is really created.

  • Oh, I never realized that Fade doesn't have Stop action, sorry..

    You can set Fade wait time to a large number and restart fade, then on frame 15 set wait time to 0 and restart it again.

    Or you can use LiteTween behavior instead of Fade, you can definitely stop it. Maybe with LiteTween you will not have this issue at all.

  • Yeah, definitely looks like a bug. It works the same in C3.

    You can change collision polygon on the character sprite like this, it will work better.

    Use a different sprite for other collision checks.

  • Can you share a small capx demonstrating the issue?

  • Use BBoxLeft, BBoxRight, BBoxTop, BBoxBottom expressions to position your panels.

    "On collision" event is a bad choice here anyway, because collision checks are performed every tick and objects can travel big distances in one tick if the speed is high or FPS is low. So, for example if you are dragging a panel and want to stop when it collides with another panel, if you move your mouse too fast, you can easily drag it 100-200px too far.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 262 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