dop2000's Recent Forum Activity

  • When a tile is touched (and not already moving), set an instance variable on this tile, for example "isReadyToMove=true".

    Then when the screen Is In Touch and there is a tile which is ready to move, compare Touch.speedAt(0) and Touch.angleAt(0). For example, if Touch.speedAt(0)>100, then start moving the tile in Touch.angleAt(0) direction, rounded to 90 degrees.

    When the tile starts moving or has arrived, and when any touch has ended, clear the isReadyToMove flag.

  • Untick "Set angle".

    If you need to set angle, you have to compare moving angle and flip or mirror the sprite. For example:

    If Sprite.Bullet.AngleOfMotion is between 90 and 269 degrees: Sprite set flipped
    Else: Sprite set not flipped
    
  • You need to add debug messages to all events. You will be able to see which events are firing and when, monitor variable values etc.

    Simply add Browser Log to critical events, then run the game, open browser console (F12) and check the logs.

    For example, add this to all AJAX On Completed:

    Browser Log "Tag: " & AJAX.Tag & ", Data: " & AJAX.LastData

    Create AJAX On Error event and also add:

    Browser Log AJAX.Tag & " FAILED!"

    Add this to the beginning of the function:

    Browser Log Browser.URL ", " & URL_GameVersion

    .

    You will find the problem in no time.

  • Why would you do this?? Two very experienced users told you that was not a good idea. C2 has basically no support, ad plugins may not get updates.. And MobileAdvert works perfectly fine in C3!

    .

    With C2 all I can suggest is to try Enhance:

    enhance.co/documentation/construct/setup

  • dropbox.com/s/ns3kdjflz5dkc83/you%20can%20do%20it%20bug%20fixed.c3p

    Loading the game on start can load a saved state from previous version, where the camera sprite was still on layout 0 and moving with the player. So I disabled event 14 too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't see any mistakes on that second screenshot where you save all those values. So the problem must be somewhere else.

    Are you sure this event is executed? Do you hear the "winnn" sound playing?

  • I just removed "on start of layout" after level check and it works (for now)

    So these events now running on every tick? This is not a good solution..

    You need to post your project file, because the problem is with how you save the values. The problem is likely with the order of events in your project.

    Local Storage events need time to complete! This means that you need to wait for them to finish before doing anything else. For example, if you are saving data to local storage, you cannot immediately switch to another layout and try to load the same data, it won't work.

  • Try increasing Max Spritesheet Size in project parameters under Advanced tab.

  • That's what I keep telling you - you need to wait until the data is read from local storage. This doesn't happen immediately, like with Webstorage. You can't compare Level variable in "On start of layout", because this value has not been retrieved yet.

    What you can do to fix this is move this Level check into a function. And call this function from both "On item Level exists" and "On item Level is missing" events.

    This is another reason why it's better to save all values at once in a dictionary. This way they will all be loaded at once and you won't need a hundred of different "On item exists" events.

  • savvito123 "Item get" and "On item get" steps are not required, this just adds many unnecessary events. From the documentation:

  • Yes it's true there is no global variables on this Event Sheet.

    This is not what I said! It doesn't matter in which event sheet your global variables are defined.

    I meant you need to run the game in Debug Mode and check your global variables - Levels, Experience etc. You should be able to see if they contain default values, or if the values loaded from Local Storage.

    .

    I think the values are loaded correctly, but you are checking them too soon. It takes some time to load data from Local Storage.

    If you can't figure out the issue, please post your project file.

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