dop2000's Recent Forum Activity

  • Tokencount(text,newline) counts the number of line breaks, it will not work here.

    I don't think it's possible to correctly count the number of lines in text object. You can use Text.TextHeight property to get the text height in pixels. And then divide this number by an average height of each line, say 30px. You'll get an estimate number of lines which may not be very accurate if you have a lot of text. Also, different browsers render the text slightly differently, so the results may vary.

    With SpriteFont you can calculate line height and the number of lines precisely.

  • If you need rigid connections, you have to make triangles. For example:

    Red lines represent joints.

    And of course you should try to minimize the number of objects with joints.

    Maybe build the line with just a few big sections using long invisible sprites with Physics. And draw a smooth visible line with small visible dots, pinned to Physics sprites.

  • Any top-level events which are not triggered (don't have a small green arrow on the left) are running on every tick.

    Even with functions you still need to use that CPU_is_busy boolean flag. Set it to true inside the "LockUI" function. Set it to false inside the "UnlockUI" function. Check for this flag in different events. Add browser-log messages to events where you call "UnlockUI", to see which event has unlocked the UI.

    I can't answer your questions about event 236 because it's not on your screenshots.

    .

    Deactivating event groups when UI is locked is a good idea. For example, you can have a group with all keyboard shortcuts. Instead of adding boolean check to each event, simply deactivate the entire group.

    To easily block all mouse activity I used this trick - place a huge TextBox with transparent background covering everything on the screen. It will intercept and block all mouse clicks, wheel events etc. In "UnlockUI" function destroy this TextBox.

  • Try NWjs.AppFolder and NWjs.ProjectFilesFolder expressions

  • There is layoutHeight expression in C2.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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

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