R0J0hound's Recent Forum Activity

  • Ah, it's probably an issue with pasting with effects and blend modes then. I won't be fixing any part of the plugin that involves applying effects any time soon.

    A possible solution could be to paste the object to another paster first, then apply a blendmode to that.

  • If you use "box2d web" instead of "box2d asm.js" you can use the browser object to run:

    "Box2D.Common.b2Settings.b2_velocityThreshold = 1.0;"

    and set it to whatever value you want. The asm.js version seems to not have that variable. This won't work after minifying.

  • You could just edit in in place if it's something just you would use. If you want to change it per project the best thing would be to add an action to the plugin. That would give the easiest access to the setting.

    I guess it may be possible to change the setting with some JavaScript run with the browser object. That can be hard though, mainly to track down a code path to access it. It would also not work if you minified your project.

  • Typically there is only a runtime and edittime js. The physics behavior Is special case. One is just a JavaScript port of box2d and one is one compiled with asm.js. It's bigger but will run near native c++ performance. You can select between the two in the project properties.

    If you were to copy the behavior just pick either file to be your runtime.

  • If you're using ajax to get the file you could try this:

    http://stackoverflow.com/questions/2235 ... -f5-reload

    aka: setRequestHeader('Cache-Control', 'no-cache') before requesting the file. Also the second idea in that link is interesting. I don't have anything to test this with.

  • I don't have all those plugins so I can't open it. I made a test and everything seems to be working fine with the paster object from my end.

    I added a sprite and a paster object to the layout. Then made an event:

    start of layout:

    --- paster: clear to (0,0,0,100)

    --- paster: paste sprite

    --- browser: invoke download of paster.imageUrl

    That worked fine. Even when changing the sprite's blend mode to any of the others. The only exception is xor, which doesn't work with webgl, but that is C2 wide.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As far as I know pasting stuff with blend modes to either canvas or paster works fine. With paster some of the blend modes have slightly different behavior with webgl on but this has to do with webgl and not the plugin.

    You'll need to give examples of how it doesn't work since blend modes worked fine for both plugins all the times I've used them.

  • What is this useful for? Just curious. The manual mentions the relevant ones, whereas much of the rest are helper functions used by the runtime that isn't useful to a plugin dev.

  • Aphrodite's way works too. Basically there are three ways:

    1. Pass by value by building a string. This one as Ashley says can be an issue if the string contains " characters. You probably can come up with a creative solution if need be.

    2. Utilize the function object. Make the JavaScript call a c2 function that in turn returns the value of something. This wouldn't have the " issue.

    3. Find where the actual variable is in c2's runtime code and access it there. This will only work with minification if done inside a plugin. Also it is the most complex to do.

  • You refer to it like this:

    "prompt('title goes here.',"& myLocalVar&")"

    The basic idea is you can't directly access an event sheet variable from JavaScript, but you can combine its value in the text.

  • It'll be a while before I can look at it. Maybe next Sunday at the earliest.

  • In your game wait till the particles are "warmed up" then set a textbox to particles.asjson. You can then copy the text from it. Next close your game, go to the event sheet and add the action "load from json" and paste the copied text and put quotes around it. Now when you run the layout the particles will already be running.

    The text you paste may need a little tweaking. Namely replace the " with '. Then you can put " at the start and end.