dop2000's Recent Forum Activity

  • const player = runtime.objects.Player.getFirstInstance();

    tm.setTileAt(player.x,player.y,123)

    player.x and player.y are layout coordinates. You need to convert them to tilemap coordinates. There are expressions like PositionToTileX/Y, but looks like there are no similar methods in the scripting API.

  • find(string, "example") will return a zero-based index.

  • When you click a family, multiple instances of this family are selected on the layout. And if these instances have different values in the boolean variable, then it's displayed as "-".

    "-" is not a value! It's just used to tell you that there is a mix of True and False values.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "Every X seconds" count doesn't reset with the start of the layout. So if you've switched from another layout, "Every 10 seconds" event may trigger sooner than in 10 seconds, or even immediately.

    That's why it's recommended to use Timer behavior for tasks like enemies spawning.

    Edit: sorry, for some reason I thought the question was about "Every x seconds". Wait action should not have this issue.

  • Are you talking about the boolean variable? Yes, minus sign in the checkbox means that multiple instances have different values in this variable - some are True and some are False.

  • You should be able to copy and paste them. Right-click on layout or event sheet name and select Copy.

  • part12studios Instead of "Set tile" in event 4, use "Erase tile" action.

    I don't know why it stopped working, this is pretty odd.

    EDIT: Found this in the Release Notes to r218:

    Tilemap: allowed setting invalid tile IDs via actions

    A change like this can break old projects..

  • I think empty cells in arrays contain 0 (zero). You can also fill them with "" (empty string). But there is no Null value in Construct.

  • It's not just you.

  • Use "System Compare two values" condition.

  • Yes, but you need to use a different notation -

    instead of runtime.globalVars.gameState = 10

    use runtime.globalVars["gameState"] = 10

    If you extracted your variable name from JSON into another variable VarName, then your script should look like this:

    runtime.globalVars[runtime.globalVars.VarName] = 10

  • You mean access variable by its string name? It's possible with scripting:

    runtime.globalVars["myglobalvar"] = 123

    Ashley warned though, that string syntax like that will be broken in advanced minification mode.

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