dop2000's Recent Forum Activity

  • There is layoutHeight expression in C2.

  • You need to pick icon_prew inside the function. If you need the same instance that was clicked, then send icon_prew.UID as a function parameter, and pick icon_prew by this UID.

  • Add browser-log messages to all events where you reset CPU_is_busy flag to false. Maybe one of them is fired after you hit the save button.

    Also, why don't you use functions? Events like 224 and 225 running on every tick are not only bad for performance, but also making it difficult to troubleshoot. Create two functions "LockUI" and "UnlockUI" and call them when needed.

  • Took me a while to understand your code, and the fact that all objects are named "Sprite" didn't help :)

    Here is the fixed version, I used drag&drop behavior and a clone family:

    dropbox.com/s/uunoysubsawqzz6/Test_leveleditor.capx

    When you drop the object and it's overlapping another object, instead of destroying it you can return it to its previous location. Use a pair of instance variables to store previous x and y.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can also zip the files in the folder, rename .zip to .c3p and open it in the browser version of Construct.

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

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

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 271 followers

Connect with dop2000

Trophy Case

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

29/44
How to earn trophies