dop2000's Forum Posts

  • Yeah, it's annoying that we can't add the NoSave behavior to data objects.

    I usually work around this by keeping an invisible sprite with the NoSave behavior on the layout and storing all data that shouldn’t be affected by saving/loading in its instance variables - for example, Array.AsJSON. Then, in 'On load complete', I read it back into the array.

  • You can configure custom properties to follow the animation name and/or frame. Check out this example.

    + System: On start of layout
    -> PlayerFollower: Follow: Follow Player (from current position False)
    -> PlayerFollower: Follow: Start following custom property "animation" Step
    
    + System: Every tick
    -> PlayerFollower: Follow: Set custom property "animation" value Player.AnimationName
    -> PlayerFollower: Set animation to PlayerFollower.Follow.DelayedCustomPropertyValue("animation") (play from beginning)
    
  • Create a gradient image (transparent to white or black) in any graphics editor. Place it on top of the sprite and apply the desired effect - for example: overlay, multiply, darken etc.

  • Webm format should work on Steam Deck - we have an intro video playing in our game on startup, no user interaction required.

    You don't need both webm and mp4 files, just keep the webm one.

  • AI can analyze C3 events if you simply copy and paste them. For example, this may look like gibberish to the human eye, but ChatGPT can easily read it:

    {"is-c3-clipboard-data":true,"type":"events","items":[{"functionName":"SaveGame","functionDescription":"Save Game","functionCategory":"Save&LoadSystem","functionReturnType":"none","functionCopyPicked":false,"functionIsAsync":false,"functionParameters":[{"name":"SaveSlot","type":"string","initialValue":"","comment":""},{"name":"Level","type":"number","initialValue":"0","comment":""},{"name":"PlayerPosX","type":"number","initialValue":"0","comment":""},{"name":"PlayerPosY","type":"number","initialValue":"0","comment":""}],"eventType":"function-block","conditions":[],"actions":[{"id":"set-value","objectClass":"GameData","parameters":{"path":"\"slot_\" & SaveSlot & \".currentLevel\"","value":"Level"}},{"id":"set-value","objectClass":"GameData","parameters":{"path":"\"slot_\" & SaveSlot & \".level_\" & Level & \".player_x\"","value":"PlayerPosX"}},{"id":"set-value","objectClass":"GameData","parameters":{"path":"\"slot_\" & SaveSlot & \".level_\" & Level & \".player_y\"","value":"PlayerPosY"}},{"id":"set-item","objectClass":"LocalStorage","parameters":{"key":"\"GameData\"","value":"GameData.ToCompactString"}}],"children":[{"eventType":"block","conditions":[{"id":"layer-name-exists","objectClass":"System","parameters":{"layer":"\"GameSaved\""}}],"actions":[{"id":"set-layer-visible","objectClass":"System","parameters":{"layer":"\"GameSaved\"","visibility":"visible"}}]},{"eventType":"block","conditions":[{"id":"pick-all","objectClass":"System","parameters":{"object":"Text2"}}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"has-tags","objectClass":"Text2","parameters":{"tags":"\"GameHasBeenSuccessfullySaved\""}}],"actions":[{"id":"set-text","objectClass":"Text2","parameters":{"text":"\"The game has been successfully saved in slot\" & newline & \"GAME_\" & SaveSlot & \"!\""}}]}]}]}]}

    It can then give you advice on how to fix a bug or optimize your code. AI can also generate events that you can paste back into the event sheet, but this can be hit or miss.

  • If you are using System Save, here is an example with multiple save slots:

    howtoconstructdemos.com/saving-and-loading-system-with-multiple-save-slots

  • Your only layer has 0% parallax. You need to either set parallax to 100%, or enable unbounded scrolling in layout properties.

    Another option:

    -> Sprite: Set position to (Touch.X(Sprite.LayerNumber), Touch.Y(Sprite.LayerNumber))

  • You can link multiple options to the same node.

    You will need to keep track of which bread and which cheese was picked with events - for example, store them in variables, in an array or a dictionary.

  • Not sure how any of that is related to setting an angle of motion. But I'm glad it works :)

  • Strangely, I can't reproduce it. Can you post your project file?

  • The Pathfinding object doesn't move immediately upon creation. There’s no motion - and therefore no angle of motion. You can simply set the object's angle instead.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ... hanging by a thread ... throw all the work in the trash...

    jomego Don't be dramatic. While many of us aren't happy about the removal of SDK1, it's not the end of the world for your studio or your projects. Just switch to the LTS version.

    Also, nothing you can say here will influence Ashley's decision in any way, have a read:

    construct.net/en/forum/construct-3/plugin-sdk-10/addon-sdk-v2-182122

  • Whenever you move objects like that, always use delta time.

    Set object.x to self.x+5 is wrong

    Set object.x to self.x+300*dt is correct

  • No, loading dictionaries with AJAX is not different from loading arrays or any other files.

    You are probably trying to get the key before the dictionary is loaded. AJAX request is asynchronous, you need to wait for it to be completed before accessing the dictionary.

  • So does this mean I have to load in the json dictionary differently from an array?

    If you're asking about the JSON string format, then yes - the dictionary JSON format is different from the array JSON format.

    {"c2dictionary": true,"data": {"0": ""}}
    
    {"c2array":true,"size":[1,1,1],"data":[[[""]]]}
    
    

    Also, please remove the "Trigger once" condition from your events. Don’t use it until you clearly understand how it works and what it does.