dop2000's Forum Posts

  • Paste this into your event sheet:

    {"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"is-button-down","objectClass":"Gamepad","parameters":{"gamepad":"0","button":"d-pad-left"}}],"actions":[{"id":"simulate-control","objectClass":"Player","behaviorType":"Platform","parameters":{"control":"left"}}],"children":[{"eventType":"block","conditions":[{"id":"is-button-down","objectClass":"Gamepad","parameters":{"gamepad":"0","button":"button-x"}}],"actions":[{"id":"set-animation","objectClass":"Player","parameters":{"animation":"\"Run\"","from":"current-frame"}}]},{"eventType":"block","conditions":[{"id":"else","objectClass":"System"}],"actions":[{"id":"set-animation","objectClass":"Player","parameters":{"animation":"\"Cwalk\"","from":"current-frame"}}]}]},{"eventType":"block","conditions":[{"id":"is-button-down","objectClass":"Gamepad","parameters":{"gamepad":"0","button":"d-pad-right"}}],"actions":[{"id":"simulate-control","objectClass":"Player","behaviorType":"Platform","parameters":{"control":"right"}}],"children":[{"eventType":"block","conditions":[{"id":"is-button-down","objectClass":"Gamepad","parameters":{"gamepad":"0","button":"button-x"}}],"actions":[{"id":"set-animation","objectClass":"Player","parameters":{"animation":"\"Run\"","from":"current-frame"}}]},{"eventType":"block","conditions":[{"id":"else","objectClass":"System"}],"actions":[{"id":"set-animation","objectClass":"Player","parameters":{"animation":"\"Cwalk\"","from":"current-frame"}}]}]}]}
    
    
  • What you’ve described can easily be done with global variables — nothing scary like arrays or JSONs is needed.

    Just store the collected resources in a couple of variables, like collectedGreenEnergy and collectedFossilFuels.

    When the player returns to town, subtract the required amount of energy from those variables and increase the pollutionLevel variable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your events 27-30 are constantly changing the animation between Cwalk and Run.

    Here is how you can fix it:

    And do the same for D-pad left events.

  • you could have an event like, "Player on collision with ground, Play Playlist 1" or whatever.

    Just put all music tracks into an array and play them one by one, or randomly.

  • I'm not sure what's going on in your project.

    Here is an updated version. It would be easier if you had a paid subscription and could use families.

    dropbox.com/scl/fi/ab0ujefk2oqnuvh87tmnh/DragDrop_pots.c3p

  • For-loop, Repeat-loop, Every X seconds, Every tick:

    construct.net/en/make-games/manuals/construct-3/system-reference/system-conditions

  • The grid is not perfectly aligned. You need to shift everything 16px down and to the right. Set grid size to 32 and border to -1.

    There is an addon that's better suited for this task:

    construct.net/en/forum/construct-2/addons-29/behavior-easystar-js-96215

  • A few things you can try:

    1. Enable auto-backup in the Construct settings — this is a must when working on large projects!

    2. I'm using this extension in Chrome to prevent accidentally closing or refreshing the Construct tab. There might be a similar add-on for Edge, or you could consider switching to Chrome.

    3. The next time the app refreshes, immediately press F12 and check the console log for any messages.

  • Ah, yes, "Dictionary set key" only works if the key already exists. I always use "Add key".

    If it still doesn't work even with "Add key", please post a new screenshot of your events.

  • You do not have permission to view this post

  • load ajax last data. I changed it to load from localStorage.itemvalue

    Sorry, of course it should be localStorage.itemvalue

    LocalStorage events are asynchronous, meaning that you need to wait for them to finish. The last event on your screenshot doesn't wait and sets player's health to the default value from the dictionary (while the data from LS is still loading). I suggest you change it to a function:

  • Tween a value, say from 60 to 1.

    While the tween is running, set animation speed to Sprite.Tween.value("tag")

    .

    You can also change frames directly:

    Tween a value from 0 to (Sprite.animationFrameCount-1)

    While the tween is running, set animation frame to Sprite.Tween.value("tag")

  • You are not using LocalStorage correctly. You can't use "get" action without checking if an item exists first. Also, you need to load the dictionary from AJAX.LastData LocalStorage.ItemValue, not from the tag.

    On start of layout: LocalStorage check item "tag" exists
    
    LocalStorage on item "tag" exists: Dictionary load from JSON string LocalStorage.ItemValue
    
    LocalStorage on item "tag" missing: Dictionary set default values to keys
  • Make sure that both animations are identical in size, collision polygon and image points.

    If that doesn't help, I suggest making the enemy invisible and using a separate sprite (without physics) with the animations. You can attach it to the enemy with hierarchy.