dop2000's Forum Posts

  • I've heard that these plugins of Ads are somehow outdated, and Android export isn't accurate

    There are performance issues on some Android devices, but other than that I am not aware about any problems with Android exports. Admob plugin works fine, and if you want more monetization options, I highly recommend Chadori's collection of addons:

    constructcollection.com

  • Request the web page with AJAX.

    In AJAX On Completed event, save AJAX.LastData into a text variable.

    After that you can parse the text in the variable using various expressions - find, mid, tokenat etc.

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

  • Are you using any addons?

  • It depends on how realistic you need it to look. If you want the wires to dangle, fall under their weight etc, then you need Physics. Connect the wire to a multimeter with a joint, and it will move with it.

    In that example you gave us, the wires are simple curves. It's easier - just draw a curve from one point to another, using the method Allan posted.

  • Are you talking about Web (HTML5) or iOS (Cordova) export? Do you tick "Hide status bar" on export? If it doesn't work in r241, please file a bug report:

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

  • 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.

  • 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()

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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