Ashley's Recent Forum Activity

  • From the Text object's manual entry:

    Text rendering

    Different browsers render text in different ways, and Construct 2's layout view also renders text differently to other browsers. This means you should expect the appearance of the Text object to vary slightly across browsers.

    You should test your game in a range of browsers to ensure text objects display how you intend for all users. For more information see Best practices.

  • In this situation if you want to do something completely different depending on the layout, you really ought to have two different functions. The old Function plugin only allowed this usage by accident, and I really think it's a poor way to structure your events - for example if you look at a "Call function" action, you can no longer tell what that does, and "Go to function" can't work - it depends on which layout you're on, which also involves reviewing the tree of event sheet includes across your project, which is hard work. If you just call a different function it's much more obvious what it does.

    How to better structure the events depends a lot on the details of your project. If you have a "common" event that really needs to call two completely different functions, I'd argue that is not actually a common event and ought to be implemented as layout-specific logic. This will involve rearranging the whole way those events are used, but I think it will be much clearer afterwards. Alternatively a quicker (but not particularly elegant) approach is just to have a global variable with the game mode that you set on each layout, and dispatch to different functions depending on the mode. I'd avoid relying on the layout name, because people normally expect to be able to rename things without breaking anything, and you end up in the situation where you can accidentally break your events just by renaming a layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This can't work in preview mode because there's no public URL to your project file. (It's not on a server, it's only on your device.) This can be worked around though, file a bug for it and we can look in to it. It should already work after exporting your project.

  • I don't think you need to specifically address this, since if you already have error triggers, if the user wants to check if the operation was successful after 'Wait for previous actions to complete' they can set a flag in the error event and then check for that flag after the action. Alternatively you can just add some success checking conditions, e.g. WebSocket's 'Is connected' condition which can be checked after the async connect action to see if there is a connection now (i.e. the connection was successful). Maybe we could adjust the design to handle this better though, but I'm not sure how that would look...

  • This is a different question to the one you originally asked, which is kind of confusing. It sounds like the obvious thing to do would be to make the script run in a function, and call the JS function from events when you go to that layout.

  • The runtime automatically stops all audio so long as "Play in background" is "No", so maybe check that setting.

  • As the message says, it only affects insecure origins (i.e. HTTP, not HTTPS). For years we have been recommending to publish to secure websites (HTTPS) to avoid exactly this kind of problem.

  • Mobile Advert only works in Android and iOS apps. It won't work anywhere else (preview, remote preview, HTML5 export, etc).

  • FYI this issue was reported and subsequently fixed in r149.

  • I would guess you actually stored a string of "1" and then multiplied that with a number. I just tried it with both the C2 and C3 runtimes though and "1" * 50 returns "1", as it is supposed to (since string * number returns the string unmodified). So I can't see any change in behavior.

  • Here's the JSON plugin manual entry.

    JSON lets you deal with more complicated data structures, such as objects with arrays for keys. While you can do a lot with Array and Dictionary, JSON lets you do even more, and since it's a standardised format is useful for integrating with other systems.

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,771,599 followers

Connect with Ashley

Trophy Case

  • 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
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x5
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x42
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs