dop2000's Recent Forum Activity

  • You need to know map height and width (in cells) and edit these tags in tmx file. Also, the number of values in csv data should equal height*width

    .

    If you can't fix it yourself, please share your files, I'll give it a try.

  • Didn't I reply you in another thread?

    You can use LiteTween addon, it's even better than C3 Tween:

    construct.net/en/forum/extending-construct-2/addons-29/behavior-litetween-48240

    (download links can be found on the last page)

    Or use Sine behavior. Or change scale in "On every tick event".

  • LaurenceBedford

    There is LiteTween addon which is very similar.

    Or you can change size in "On every tick" event, or with Sine behavior.

  • This is not how you load data from json file into the array..

    You need to change your code like this:

    Note, that "For each element" loop is a sub-event under "On start of layout".

    Also, you have a very inefficient way of storing level objects in the array. You are basically designing the level in the array with numbers. Why not draw it on the TileMap in layout editor? It will be much easier.

    The traditional method is to store object types and their coordinates, something like this:

    wall, 100, 50
    wall, 120, 50
    wall, 150, 50
    chest, 200, 100
    zombie, 300, 120
    

    Of course, you don't enter these numbers manually, you prepare them using some kind of level editor.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Repeat 7 times
     Create object at x=(50+(loopindex%2)*100), y=(50+int(loopindex/2)*100)
    

    50px is the offset of the first object, 100px distance between them.

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

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

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