R0J0hound's Recent Forum Activity

  • You’ll have to look at the api of the export you used. They usually expose extra stuff to JavaScript. You’d have to just look at their docs. They typically have a plugin system to include more. The most I’ve fiddled with is extra stuff in nwjs, but it should be similar for other exports. You would use the browser execjs action to access it. That stuff isn’t minified.

  • If you look at one of the disabled lines I have that case covered.

    Execute js “global.myvar=“&textbox.text

    You could just as well do an Ajax request and then do

    Execute js “global.myvar=“&ajax.lastData

  • It’s declared in the first start of layout. “global” is the global object and we add myvar to it by assigning something to with global.myvar=. After that you can just use myvar instead of global.myvar.

  • If you have a number in a variable n, you can do this:

    e= int(log10(n))

    set text to int(1000*n/10^e)/1000&"x10^"&e

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Grimmy

    You can do it with the browser plugin's execjs action and expression. The only learning curve is dealing with quotation marks ("). You'll want to use single quotes instead ('), or use "" when you want to use a " in Construct expressions.

    Anyways here's an example:

    https://www.dropbox.com/s/uhxb4e6eoypih ... .capx?dl=1

    There really is no reason to use a json plugin, other than error catching i suppose.

  • Paste an object with the destination out blend mode. That erases.

  • Looks like a nice idea but when picking is involved the “or” version would work differently than the duplicated events version.

    Events a

    Or

    Events b

    —- actions c

    Is the same as

    Events a

    —- actions c

    Else

    Events b

    —- actions c

    What you probably expect is:

    Every tick

    — sprite: set bool picked to false

    Events a

    —- sprite: set bool picked to true

    Events b

    —- sprite: set bool picked to true

    Sprite: is picked

    —- actions c

    But or doesn’t work like that. Plus even that works different than duplicating events. I actually only use or in simple cases.

  • Typically javascript is never the solution. Why not just move it with events, it's almost always easier? If it messes up whatever other movement you have then you could make a second object and position that from the first one, and make the first sprite invisible.

    If you really want to use javascript then look at making a behavior with the sdk. There's a section on the manual for it.

  • I must say, that was inappropriate.

  • YoHoho

    Updated link.

  • Do you move the ground sprites at all?

    Does it still occur if you use “time =0.1” instead of start of layout?

    Worst case, make a copy of your project and start removing everything else until it stops occurring. At the very least it will give a minimal example.

    To me it looks like things are being moved after you set the position.

  • Nothing is wrong with your equation, there is something else at play here.

    Have you tried putting them on the same layer first before setting the position? Perhaps some parallax is the issue.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound