dop2000's Recent Forum Activity

  • The easiest solution is to use min() expression.

    Set betAmount to min(betAmount, totalMoney)

    or clamp if you also want to prevent negative values:

    Set betAmount to clamp(betAmount, 0, totalMoney)

    .

    Check out the documentation, there are lots of useful expressions!

    construct.net/en/make-games/manuals/construct-3/system-reference/system-expressions

  • See the comments here:

    github.com/Scirra/Construct-bugs/issues/8576

  • If you limit the fish’s turning angle so it can’t make sharp turns, and its body is shorter than the turning circle (i.e. the path it would take to complete a full turn), then it won’t be able to overlap itself.

  • You can make a list and create objects by name.

    Variable list=apple,banana,plum,orange
    
    Repeat tokencount(list) times
     Create object by name: tokenat(list, loopindex, ",")
    
  • I had to click save several times on each project in order for the save icon to deselect and construct to allow me to close

    This actually has been happening for me in the past few days - the save icon stays active for about 20-40 seconds after saving. Maybe the fact that you clicked it multiple times broke something in the project..

    You can try sending the project to Construct support email. Don't forget to attach all used addons.

  • Just to add some additional information — in that example, the JSON contains an array of books: "books":[...] This approach works well when you have many books. However, it's not necessary to store data in arrays when using JSON. In fact, I rarely do that.

    For example, if you want to store stats for different weapons in an RPG game, using an array means you'll have to iterate through it every time you need to find a specific weapon:

    {
     "weapons": [
     {
     "name": "Short Sword",
     "type": "melee",
     "damage": 8,
     "range": 1,
     "weight": 3
     },
     {
     "name": "Longbow",
     "type": "ranged",
     "damage": 12,
     "range": 10,
     "weight": 4
     },
     {
     "name": "Fire Staff",
     "type": "magic",
     "damage": 15,
     "range": 6,
     "weight": 5
     }
     ]
    }
    

    To find a weapon you will need to loop thought the array:

    JSON For Each element in "weapons"
    JSON compare ".name"="Short Sword"
    

    It's much easier to store each weapon as a separate object instead:

    {
     "short_sword": {
     "type": "melee",
     "damage": 8,
     "range": 1,
     "weight": 3
     },
     "longbow": {
     "type": "ranged",
     "damage": 12,
     "range": 10,
     "weight": 4
     },
     "fire_staff": {
     "type": "magic",
     "damage": 15,
     "range": 6,
     "weight": 5
     }
    }
    

    Then you can access any weapon and its stats directly with a single expression, for example:

    JSON.get("fire_staff.damage")
    

    And of course objects can contain nested objects and arrays:

  • Did you update any addons?

    I can still open earlier versions of my file from yesterday

    Can you run an experiment? Open an earlier version of the project in the latest beta, save it, and see if you can open it after that. (make a backup copy of course first)

  • I posted this link in your previous topic, did you see it?

    howtoconstructdemos.com/match-letters-game

    There are only 10 events with comments, easy to study.

    If that's not what you are looking for, then try searching for tutorials, for example:

    construct.net/en/tutorials/creating-memory-match-game-148

  • Use Timer behavior - start a timer for 2 seconds. While the timer is running, ignore any damage.

    Or you can set a variable Invincible to true. Start a timer and on timer event reset it back to false. Add a condition "not Invincible" to all events where the player receives damage.

  • You do not have permission to view this post

  • Assuming the image is on a DrawingCanvas:

    -> DrawingCanvas: Save image (PNG, quality 100, offset 0, 0 size 0 x 0)

    -> System: Wait for previous actions to complete

    -> Browser: Invoke download of DrawingCanvas.SavedImageURL with filename "image.png"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have you tried Paster plugin? It's similar to Canvas, and as far as I remember, it works well when pasting on every tick.

    Also, try moving the pasting events to the bottom of the event sheet.

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