dop2000's Forum Posts

  • I know, just saying - it was really easy with Canvas, just one action.

    Also, I'm not sure how to keep the curve length constant. Wires should not stretch or shrink as you move them.

  • Yeah, in C2 you could easily draw bezier curves with Canvas addon. In C3 Drawing Canvas this feature is still not available.

  • You can try making the wires with physics. Here is a demo, it's not very good, but may be a starting point

    howtoconstructdemos.com/create-a-realistic-chain-or-rope-with-physics

  • Your question is not very clear.

    You can add many balls on the layout (set them invisible if you want). When a name is entered in Textinput, pick a random ball with empty name, assign it new name and make it visible.

    Use "System pick random instance" event.

  • Are you using "Every 1 seconds" event? It's not accurate because the first time it may trigger earlier if you return to this layout from another layout.

    I suggest using a Timer behavior on some object instead.

  • You didn't show what actions you need to perform in each case. It may be possible to optimize all these events if the actions are similar. Say, if you need to change some other variable based on StoppedOnBlock, you can use ternary operator:

    Set var to (StoppedOnBlock=1? "red": StoppedOnBlock=2? "blue": StoppedOnBlock=3? "green": .....)

  • That's why it's recommended to use a separate object for platform character:

    1. Create an invisible sprite PlayerBox with platform behavior, with a single rectangle frame.
    2. Remove Platform behavior from your existing Player sprite with all player animations.
    3. Pin or attach using hierarchy Player to PlayerBox.
    4. Use PlayerBox in all events related to Platform.
    5. Use Player to control character appearance.

    See "Guided Platforms" template for an example.

    You will have to edit origin image points in all animation frames. Set them to the same point on the character, for example in the middle of its chest or feet.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to give an id to the iFrame and try something like this:

    runtime.globalVars.New=Myiframe.contentWindow.document.getElementByClassName(...

    .

    If this doesn't work, you can create a JS function inside the iframe, which will retrieve the value from your HTLM element and return it. And then call that function from Construct:

    runtime.globalVars.New=Myiframe.contentWindow.functionName()

  • There is a SwitchCase addon for C2, but it's a bit awkward to use.

    If you have lots of conditions, it may be better for performance to add "Else" to all subsequent conditons. Also, you can use "StoppedOnBlock Is between values 7 and 11" in the last one.

  • So is this iframe inside your game, or the game inside the iframe?

    Check out this demo:

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

  • There is Jump Sustain setting on the Platform behavior, have you tried it?

  • Can you execute a JS code when the value is updated in the parent page? If yes, then you can call C3 function:

    c3_callFunction("UpdateVariable", [newValue]);

    And in Construct create a function "UpdateVariable", which takes the parameter and saves it in the variable.

  • Have you tried "Physics Set Stepping Mode" setting?

  • Here is the easiest method:

  • Does this happen on other computers or browsers? Try temporarily adding "Local Storage Clear" to the very start of the project and run once. If LS is corrupted, this should fix it.