dop2000's Recent Forum Activity

  • I think the easiest fix would be Mode: Exclude and Mode: Include

    -> Sprite: Set solid collision filter to Include "tag"

    -> Sprite: Set solid collision filter to Exclude "another_tag"

  • Yes, a sub-event without a condition. You can selected the parent event and press B. Or create any event and remove its condition.

  • It's easier with families and instance variables.

    dropbox.com/scl/fi/npuiuyccucqb6ul0hra6m/SwapGunsInSlots.c3p

    If you are using C2, open the project in free version of C3 to see how it's made.

  • 1pt font size is extremely small, I'm sure that's why it's not working correctly.

    Try setting negative values for the line height, like -5

  • Check line height in text properties - maybe it's set to a very high value.

    Actually, I see on your screenshot that line height is 0. But it also shows font size as 1 - is it really that small, only 1pt?

  • I was hoping there was a dynamic method

    You can paste your text on a drawing canvas - it also supports meshes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think it would be easier to save the timestamp for 0:00 on the most recent Monday in Local Storage. Then, each time the game runs, check if more than 7 full days have passed since that timestamp (7×24×60×60 seconds). If so, reset the tasks and save a new timestamp — again, rounded to 0:00 on Monday.

    ChatGPT gave this formula:

    const MILLIS_IN_WEEK = 7 * 86400000;
    const MONDAY_OFFSET = 4 * 86400000;
    const mondayMidnight = Date.now() - ((Date.now() - MONDAY_OFFSET) % MILLIS_IN_WEEK);
    
    
    Date.now() - 345600000 shifts the epoch so that Monday 00:00 aligns with multiples of 604800000.
    Taking modulo % 604800000 gives the time since the last Monday midnight.
    Subtracting that gives the timestamp of the most recent Monday at 00:00, cleanly.
    

    But I think it would be for GST, you'll need to adjust it to local time zone.

  • I made this a few years ago:

    dropbox.com/scl/fi/8e36p0902dxolxfgu6bzm/StarWarsText.c3p

  • Here is an example:

    Chemic pick children Molek
    For each Molek
    ... Dictionary add key Molek.dx & "," & Molek.dy
    
  • With all this in mind, where would you suggest the overhaul begin?

    I don't know.. Perhaps you could build the dictionary when needed from the hierarchy.

    I'm not saying that your current approach is bad. But sometimes it's worth the effort to step back and replace a system that's overly complex or hard to maintain with something more manageable in the long run.

    One other thing to consider about the hierarchy system: it doesn't support loops. So if you need looped chains, like in the image below - you’ll have to connect all Moleks directly to Chemic.

    In that case, when any Molek is removed, you'll need to check which Moleks are still connected to Chemic and rebuild the hierarchy accordingly.

  • I sort of get your idea, but I think it's overly complicated and hard to troubleshoot. You're destroying and recreating all markers and repopulating the dictionary on every tick, which makes it even more confusing.

    I’d strongly suggest using the hierarchy feature instead, it will be A LOT easier. Attach Moleks to Chemic as children - this way, they’ll automatically move together and stay logically connected. You won’t need dictionaries or extra variables at all. You can find parent or child object at any time with "Pick parent/child" condition.

    There are two ways to build the hierarchy: either attach all Moleks directly to the parent Chemic, or create a chain. I’m guessing the chain would be more suitable in your game. If a middle (blue) Molek in the chain is removed, it will automatically break into two smaller chains. Or you can detach pink molek from yellow as well.

  • I don't understand what you're calling a chain then. I don't see any physical connection between objects in your screenshots — so what exactly is the chain, and what do you need to do to break it? What are the markers used for?

    The very first event in your screenshot probably creates hundreds of markers every second, because it runs on every tick. So that’s definitely wrong — unless the third event immediately destroys them? Have you tried running the game in Debug Mode? Run the debugger, create a chain, hit pause, and check all objects, their instance variables, the dictionary content, and so on.

    Your code is confusing, and I’m afraid you might be the only person who fully understands it...

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