dop2000's Forum Posts

  • Feels like your array is storing string values instead of numbers. Or perhaps the size is wrong.

    Can you add an action "Array -> Download" and post the result, for both affected arrays?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On PC you are downloading the data in Base64 format, which is basically text.

    On Android you are sharing a binary file - i.e. not text. You need to convert the data to Base64 before sharing.

    You can try this:

    -> BinaryData: Set buffer to UTF-8 text Self.GetBase64
    -> Share: Add file Levelname&".txt" type "text/plain" from BinaryData
    
  • Here is an example of knight movement:

    dropbox.com/scl/fi/if73d7fsl1hfrxrkirp1m/Chess_example_knight.c3p

    You can create similar patterns for the other pieces. For pieces like rooks and bishops, you'll also need to use LOS to check for obstacles in their path.

    That should cover the basic movement rules, but you'll still need to handle the rest of the mechanics: capturing, castling, check and checkmate detection etc.

    And if you plan to add AI, the difficulty goes up dramatically. I don't think that's realistically achievable with pure events in C3.

  • My Dropbox keeps saying "can't load this file type" what do i do?

    Click "Download" button.

  • How do you want to mix the colors? If you just calculate an average between the two colors, eventually all children will be grey. Try asking ChatGPT, maybe it will give you some ideas.

    But you have lots of other serious problems with your code:

    1. You can't check if Blockers has LOS to Blockers and overlapping Blockers. There is no way to distinguish instances and it won't work correctly.

    2. Never use "trigger once" with multiple instances!

    3. Never use "wait" in events which can run on every tick.

    4. Don't put triggers (like "On created") in sub-events.

    Here is how you properly do this:

    dropbox.com/scl/fi/o41cpviriwnukb43jteaz/BlockersDemo.c3p

  • I think instead of checking which keys are presses, you need to compare the angle in which the character is moving. For example:

    Player is moving
    
    ..Player.8direction.MovingAngle is within 22.5 degrees of 0: Set "WalkRight" animation
    
    ..Else Player.8direction.MovingAngle is within 22.5 degrees of 45: Set "WalkRightDown" animation
    
    ..Else Player.8direction.MovingAngle is within 22.5 degrees of 90: Set "WalkDown" animation
    
    .. and so on
    
    
  • You can't snapshot it directly with Construct, but there may be another solution. Here is an answer by ChatGPT, I don't know if it works or not:

    chatgpt.com/s/t_68b5086322e48191a6a7b7be5f231e82

  • Characters are appended to the text one by one, but I'm skipping * and ^

  • It's difficult to pause the typewriter at exactly the right moment. As far as I know, there's no reliable way to detect the current typewriter position. And no way to tell it to skip parts of the text (the pause tag).

    You can split the text into multiple sub-strings, and type each sub-string separately. But there is another problem - the built-in typewriter clears the text if restarted..

    I would make my own typewriter, here is an example:

    dropbox.com/scl/fi/zf1tmjxl5deo6srrl4i3o/BBCode_Typewriter2.c3p

    I'd also suggest not using square brackets for tags, because Construct can mistake them for BBCode. I often use ^ symbol for breaks in the text.

  • Programming chess with events would be a pretty big task - there are a lot of rules. Especially if you’re planning to take the classic array-based approach.

    I'd actually suggest avoiding arrays altogether and instead building everything with sprites, tilemaps, collision checks, image points, raycasting, etc. - it should be easier.

    If you hadn't mentioned 'alternative rules', I would've just recommended using a JavaScript library. Here's an example:

    howtoconstructdemos.com/chess-game

  • I think vectors are inherently broken in 8behavior. Here is why:

    github.com/Scirra/Construct-bugs/issues/6323

    And here's another example:

    Two almost identical events produce different results. Basically, it’s hard to make an object move in the exact direction and speed you want just by setting vectors - especially when it’s close to max speed and acceleration/deceleration are involved.

    The boolean "in water" sets correctly.

    Not really. Remove "every dt" and "trigger once" conditions, they are not needed. And the "trigger once" will cause bugs with multiple entities.

    Also, why are you testing at 10 fps? Construct won't work correctly at framerates below 30.

  • Check if you've accidentally set a non-zero z-elevation on the tilemap or on the layer.

  • Combine events 229 with 230, 237 with 238, see if it helps.

  • Here is an old demo:

    howtoconstructdemos.com/communicating-with-an-iframe-in-construct

    You can pass JSON as text and parse it on other end.