dop2000's Recent Forum Activity

  • Congrats on finishing the project.

    Have you fixed that messy code you used to checks if the answer is correct?

  • Not all tutorials are good and you've picked a bad one..

    I made this quick demo, take a look:

    dropbox.com/s/lgtrbsv5y0l5jv3/PhysicsChain.capx

  • If you need the sprite to move precisely to another tile, use MoveTo or TileMovement behaviors.

  • What about the percentages? I told you, the problem may be because with certain isolation/cleaness values your formulas are adding only 0.02% to the infected, but with other values they might add 1.02-3.02%, this is a huge difference. Maybe the infection_rate value should be 2, not 0.02

    .

    With 45 isolation and 100K people: 100000*(0.02)/100 = 20 infected

    With 15 isolation and 100K people: 100000*(0.02+3)/100 = 3020 infected

  • If you use one sprite, your function will look like this:

    You will only need ~20 events, instead of 200.

  • You already have Areas family. To start using it you need to move all variables from sprites to the family level. Check out this tutorial:

    construct.net/en/tutorials/upgrade-object-family-319

    But it may be even easier just to use one sprite Area with 9 instances. (delete all other area sprites).

  • (0.02/100) is not 2%, that's 0.02%. So if the isolation is 40-50, you are adding only 0.02%, but if the isolation is 10-20, you are adding 3.02%, which is 150 times more! Maybe that's why you are seeing such a big difference in numbers sometimes.

    Other than that I think your formulas are working correctly.

    But your code is extremely inefficient. Are you planning to duplicate events 23-57 for other 8 areas? This is a terribly wrong approach, don't do this!!

    Use a single sprite object for all 9 areas (make 9 instances of it). Or add all 9 areas into a family. Use the family in all events and you will be able to optimize your code by 80-90%!

  • Yeah, you need to post your code. Is it possible that you are processing areas multiple times? For example, if you have a loop and not picking the right area instance inside the loop, then "infected" variable will be incremented for all areas several times each turn.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Which of these variables are absolute values, and which are relative (percentages)? What is the value of infection_rate?

  • I never thought about this before, but I think all characters in the sprite font image need to be the same width. Spacing data is not used to determine character position in the image. It is only used to remove extra empty space from the right if the character is smaller than the default width.

    So think of the sprite font image as a tilemap - each character needs to be inside its own tile.

    I highly recommend using Spritefont Generator tool - it will format the image and generate the spacing data for you.

  • To add to plinkie's answer - events 11 and 12 on your screenshot are running on every tick. So if you are disabling Sine in some other event, these events 11 and 12 may immediately re-enable it.

dop2000's avatar

dop2000

Online Now

Member since 26 May, 2016
Last online 26 Jun, 2026

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