dop2000's Recent Forum Activity

  • Do you press the notes with mouse/touch?

  • Is there anything wrong with this method?

  • curFrame variable is local, it's reset to default value at the end of each tick. You need to set it as Static - then it will remember its value.

    Check your other local variables, you may need to make some of them static as well.

  • There is a new feature in C3 - interactive layers.

    construct.net/en/make-games/manuals/construct-3/project-primitives/layers

    You can set "interactive" property only for the layer with the current difficulty, then all other non-interactive layers will not receive mouse events.

  • This will be really difficult to make a system which will parse object names and instance variables in JSON strings. What I usually do is I add simple tags, for example: "Hey, (player_name)! If you bring me the magic scroll I will give you (coins) gold coins!"

    And then before showing this line on the screen I replace tags with real values.

    Set text to replace(text, "(playerName)", Player.Name)
    Set text to replace(text, "(coins)", NPC.questPrize)
    
  • Use "Platform Set Vector X" action. On collision with the wall, if the wall is to the right from the player (compare wall.x), then apply a negative vector, for example -100. If the wall is to the left, apply positive vector +100.

  • I think falling back to the default instance is reasonable if the given template does not exist.

    Template name will often be generated from some expression and I would prefer if nothing is created when such template doesn't exist. In many cases this will be less harmful than creating the wrong default instance. Here is an example:

    Maybe as an alternative solution you could add some method to check if a template with the given name exists? Say, a System condition. And also an expression to get the template name of the created instance? (so that I could immediately destroy it if it's wrong)

  • It's impossible to read that code you posted. Can you share your project file or a screenshot of events?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • DiegoM I discovered that when you try to create an instance with a non-existing template name, the default instance is created. I think the correct behavior here would be not create anything - similar to how nothing is created if you specify a non-existing layer name.

  • Ashley

    Templates may help to spawn the right tilemap instance, but there may be cases when this will not work.

    In my example, some scenes may not contain a tilemap. If I create a scene by template and then attempt to create a (non-existing) tilemap instance with the same template name, the default instance of the tilemap will be created. By the way, this seems like a bug, I think if the template doesn't exist, then the instance should not be created. Like when you try to create an object on a non-existing layer.

    Of course, it's possible to find workarounds, but they will require a lot more effort. It would be much easier if tilemaps supported hierarchy.

  • When using a variable like "menuIsOpen", or checking if the menu layer is visible, the important thing is to change this variable (or layer visibility) after a small delay. For example:

    Mouse On MenuCloseButton clicked 
    Layer "menu" is visible
    ... Wait 0
    ... Set layer "menu" invisible
    

    There is a new cool feature in Construct - interactive layers. When layer is not interactive, objects on it will not receive click events. But you still need to be careful not to enable layer interactivity setting in the same tick with the mouse click, if you don't want the same click to go through to that layer.

    Mouse On MenuCloseButton clicked 
    ... Wait 0
    ... Set layer "game" interactive True
    
dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-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
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies