R0J0hound's Recent Forum Activity

  • —

    Sprites share the same image across instances, so if you change one frame all other instances will change too.

    You'll need to use another plugin to allow each instance to have a unique image. The paster plugin can do this, and I think tiledbg can as well.

    There may be others. Here's where to go to find them:

  • For like your picture you can use cos() to calculate the amount to rotate. Grass directly above and below won't rotate at all, and grass directly to the sides will rotate the most. 10 degrees in the following.

    Set angle to 10*cos(angle(centerx,centery,grass.x,grass.y))

  • mattb

    No it doesn't. It's part of the now free chipmunk2d pro version which isn't really portable like the normal chipmunk2d api.

  • Chipmunks collision response is just spongier than box2d as best I can tell.

  • — le Canapin

    map.tileAt() is just getting the tile the projectile's center is currently on, which will almost always be -1 or empty because when it collides with the tilemap only it's edge is touching a tile.

    "on collision" may not be triggered because the physics already resolved the collision and it is no longer overlapping. You'd have to test this to be sure, since I thought that the physics behavior would trigger it directly.

  • heliogame

    The actions you're using to erase/set a tile are using

    Tilemap.TileToPositionX(loopindex("tileX"))

    but the actions are asking for tile column and row not layout x and y. So if you change it to:

    loopindex("tileX")

    it works.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, after creation, outside of the same event or sub-events you have to wait till the next toplevel event to be able to pick the new object.

    More details I've compiled in the past. CC did it too.

  • Arrays have a load action so you can do this:

    Array2: load from array1.asJSON

  • All the plugin does is load an url. Any caching is completely out of it's control as far as I know.

  • Personally I hate populating arrays one at a time like that. Also is the id just +1 from the array index at all times? I'd make a function to initialize in a cleaner way.

    Start of layout

    function call "initGun" (1, 10, 400, 1)

    function call "initGun" (2, 5, 400, 1)

    function call "initGun" (3, 40, 300, 3)

    function call "initGun" (4, 100, 200, 10)

    On function "initGun"

    GunArray Set value at (function.param(0)-1, GUN_ID) to function.param(0)

    GunArray Set value at (function.param(0)-1, DAMAGE) to function.param(1)

    GunArray Set value at (function.param(0)-1, SPEED) to function.param(2)

    GunArray Set value at (function.param(0)-1, FIRE_RATE) to function.param(3)

    And you can also make a comment by adding another parameter that you don't use. ex:

    Start of layout

    function call "initGun" (1, 10, 400, 1, "pistol")

    function call "initGun" (2, 5, 400, 1, "rifle")

    function call "initGun" (3, 40, 300, 3, "shotgun")

    function call "initGun" (4, 100, 200, 10, "pea shooter")

    If I had an immense amount of guns I'd go a step further and add a txt file to the project that I'd load and with ajax and parse the data from it with tokenat().

  • You can use equations like the following if you're using physics equations

    http://en.wikipedia.org/wiki/Orbital_sp ... ital_speed

    There are some capx here:

    how-do-i-set-up-an-span-class-posthilit-orbit-span-using-physics_p855815?#p855815

  • Lerp (a, b, t) as an equation is:

    a+t*(b-a)

    Clamp(a,b,c)

    Just takes a value "a" and limits its value to between b and c

    This is all that clamp does:

    If a<b set a to b

    If a>c set a to c