dop2000's Recent Forum Activity

  • If you have three "Open" functions and all three are called at the same time - that's poor project design, not a C2 issue.

    Construct does many things differently from "real" programming languages, but personally I like how flexible functions in C2/C3 are.

  • unixtime can only return current time. So to convert any date/time in the future you need to use some external function or addon.

    Rex's "date" addon can also convert to unix time.

    EDIT:

    Actually, you don't need to use C3 expression and can calculate the remaining number of seconds directly in JS:

    Set difference to: Browser.ExecJS("(new Date('" & textDate & "').getTime() - new Date().getTime()) / 1000")

  • JS code converts date (textDate) into Unix Epoch Time - number of seconds that have elapsed since January 1, 1970

    "/1000" because that JS function returns milliseconds, and we need seconds.

    unixtime is a C3 expression, it returns current system time in unix format, also in milliseconds.

  • Are you using AJAX to request files? Could you post a screenshot of your code?

  • I think this is by design.

    There are situations where you might need multiple functions with the same name.

    Say, you can have different event groups (KeyboardControls, MouseControls, GamePadControls) and a function named "FireWeapon" in each of them.

    Only one of these groups will be active, so you can call "FireWeapon" function from other parts of your project and don't need to worry about the selected control type.

  • See these two files:

    https://www.dropbox.com/s/8zap7yuhwdb0p ... .capx?dl=0

    https://www.dropbox.com/s/r1em8npglbdso ... e.png?dl=0

    (I downloaded them from some old post, which unfortunately I can't find now)

    This example may look different from what you need, but it basically does the same task - connects occupied tiles on the tilemap to each other.

    So if you have two tiles, one at (0,0) and another at (0,1), you need for the first one to select the tile with exit on the bottom, and for the second tile - with entrance on the top. And so on..

    You can do all this with an array instead of the tilemap.

  • Music should continue playing when you change layouts. You probably have an event "Play music" somewhere that is triggered when you go to another layout, that's why it gets restarted.

    You can do this:

    Audio tag "music" is NOT playing -> Audio play Music with tag "music"

    This way even if this event is triggered multiple times, it will not restart the music that is already playing.

  • Here you go:

    https://www.dropbox.com/s/mvkeozz88p943 ... .capx?dl=0

    May not be the most optimized code, but it works.

  • You don't need a button to save or load.

    You can save/load the game automatically whenever you like - before changing layouts, or when layer mission is complete, or when player collected some item etc.

  • There is a link to capx file on the left....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use find() and mid() expressions:

    Set position1 to find(text, "Chapter1")

    Set position2 to find(text, "Chapter2")

    Set resultText to mid(text, position1+len("Chapter1"), (position2-position1))

    Of course you should add various checks in case any of these chapters don't exist, trim spaces and line breaks etc.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 280 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