R0J0hound's Forum Posts

  • FunkY Koval

    In JavaScript all numbers are double precision, so I doubt it's an issue with a layout that size. It would be the same with any other behavior.

  • in your code "obj" is a list of instances, not one instance. In which case obj.runtime is undefined, and thus the error.

  • When you use an object as a parameter the runtime gives you an object type. From that you can get a list of picked instances or a list of all the instances of that type. Iid is just an index in the instance list. The sdk manual should have all the info needed to do that, and for examples on how to do it look at existing plugins to see how they do it.

  • All wait does is delay the following events from running. To make it conditional it's probably simpler to use something else like a variable used as a timer or the timer behavior.

  • You should be able to fix it by selecting the non asm.js physics setting in the project properties. That error is cased by asm.js only being able to use a fixed amount of memory and when you create a lot of new physics objects (like changing a tile does) then eventually it will run out of that fixed amount of memory.

    Now it could be argued that the memory management of the asm.js version of physics is broken, since even if all the physics objects are recreated every frame, then the total amount of memory needed should be the same.

  • I guess it depends on what version of windows you have. The latest I've tested as working is win7 32bit I believe.

    That dll is an update for dx9. Typically you get it installed with dxwebsetup.exe that's in Construct's install directory. The link fm4fanAT posted should be basically the same. If windows won't let you install it then that's an issue on their end,

    Copying dlls over manually probably has it's issues as well, such as other dlls it depends on or relying on 32bit windows or something. It probably can be done but I'll probably not look into it further.

    You could always look here and see if this works:

  • Tested and I can reproduce. It removes the first action.

  • Radulepy

    I don't get that error in the example I posted, even with more than 20 enemies, so I maybe you do something different in your capx.

    In most cases a javascript error is a bug so maybe try making a minimal example that causes it and post it in the bugs section.

  • There are two ways.

    One is to do 5bit like you have above

    If a tile is blue start with 256

    And if the tile is red start with 512

    Then add the surrounding tiles.

    Blue tile values

    0 1 0

    2 0 8

    0 4 0

    Red tile values

    00 16 00

    32 00 128

    00 64 00

    If you looked at the tiles around an empty spot too there would be a total of 1024 combinations. Which is a lot to draw.

    To knock down the combination count you can put some restrictions.

    The simplest would be to have each tile type on its own layer, and do bitwise on it's own layer.

    More complex setups could be done depending on how you want it to look.

  • 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

  • Try Construct 3

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

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