R0J0hound's Forum Posts

  • Basically it's done by looping over all the pieces and flood filling to the other pieces of the same color. Use a variable to label each group and to make the pieces that were processed already.

    The only optimization is to use an array to do a piece lookup instead of picking by collision or general picking.

    Here's an example to peruse:

    https://dl.dropboxusercontent.com/u/542 ... match.capx

  • Here's a recent example of making a callback:

    Basically you add the function object ad you can then use:

    c2_callFunction() in javascript to call a c2 function.

  • The keycode gives the physical key location more or less, and the other function converts that to the character. It doesn't take into account if capslock or shift is pressed though.

    Here's a way to take into account shift and capslock.

    https://dl.dropboxusercontent.com/u/542 ... essed.capx

  • It's probably too broad a request. You can do anything that you can with normal python. If you want to interface with Construct objects then it's mostly straightforward, although there are many gotchas since the way events work are very different to python. Do a forum search for python and you'll get a lot of info. Only search for posts by me and that narrows it down a bit to more relevant info.

    There are also things you can't access from python, but it all depends on what you want to do.

    Generally events are a better way to write stuff. Python is more reusable but it's main use is to interface with third party libraries.

  • It's a driver issue. I get it with my ati radeon x1200 card in C2's editor with the latest driver. Hopefully you have a newer card that can use a newer driver. Power of two textures display correctly at any size in C2's editor for me. The issue doesn't occur at export at all.

    As an amateur opengl programmer I'd guess it's a mip mapping issue with the textures. Maybe you could tinker with the mipmapping settings for your driver? I posted a possible coding solution before that I've used in another project, but when ashley tried it the result had no effect on my end. In the end it may be some other obscure driver bug causing it or something.

  • I take it Array is a construct array, in which case it won't do what you want from Python. You need to loop over the construct array to get each value and then either add those values to a python array or a string.

  • You probably need to convert the the value to a string first. The python str() function should do it.

  • RBuster

    There is a .asJson expression but it's probably to use the .imageUrl expression.

  • You can also do it with a loop. Here's an example to get the low and high x:

    global number low=0

    global number high=0

    every tick

    --- set low to infinity

    --- set high to -infinity

    for each sprite

    --- set low to min(sprite.x, low)

    --- set high to max(sprite.x, high)

  • Possibly, but even though I made that very effect I find it cumbersome to use.

  • Prominent

    Feel free to go for it. All my plugins/behaviors, unless I explicitly specify otherwise, can be used in games that are sold.

    In regard to the template, You could even include the plugin with it, although it would likely be better to just refer them to the plugin topic. The only requirement is I should be credited for making it.

    Basically the use is very liberal. Do anything you like with it, even modify it, just don't claim to have originally created it.

  • This topic may be of use:

    Chrome uses a color profile to adjust the colors. Or something like that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not sure I follow. In your example the sprite with the blend mode is on layer 0 and is covered by the objects on the other layers.

    In general a blend mode will effect everything drawn before it, or if the layer has "force own texture" then it will only affect what's already drawn on that layer.

    More complicated setups such as objects on one layer only blending with objects on other isn't possible with vanilla C2. You can use the paster object to do any complicated setup though. Just think of each paster as a layer and selectively draw stuff to it.

  • Except you can't access the same stuff you can from C2's expressions.

  • The limitation of the creature2d plugin has to do with the limits of what plugins can do in C2's editor. At runtime all the features could be used, although it takes someone interested enough to do it. Also webgl is needed for the deformations to display quickly.

    Anyway a plugin for this runtime would have the same limitations. I also stand by my original statement about the ease of making the plugin, since it's js runtime is abstracted in a complicated way that isn't directly usable like the creature2d one is.