R0J0hound's Recent Forum Activity

  • R0J0hound you should really integrate the PasteDelete stuff officially...

    I won't integrate it, because it will only work with the Sprite object if it's effect is set to "none". If the sprite uses any other effect PasteDelete won't work right. It also won't work with TiledBackground or Canvas objects either.

    Just give whatever object you want to delete from the canvas a "destination out" effect before pasting it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It looks like there are two instances, so you need to find the second. Make sure all the layers are visible and have "parallax in editor" for each layer set to no. Then search the layout.

  • There are no instances of that array object on your layout. When there are no instances the expressions default to 0. The only solution at this point is to delete the Direcciones object from the "object types" folder and create a new array on the layout.

    Ashley

    This situation is pretty easy to reproduce.

    1. Create Array.

    2. Delete Array from objects bar.

    At this point Array only exists in the "object types" folder, and there is no way to add an instance of it to the layout.

    Could a solution be to allow dragging Array from the "object types" folder onto the layout if there were no instances of it already there?

  • Store the walls in an array and flood fill the area outside the walls, then any place that isn't filled create a floor sprite.

    I made an example capx but then noticed that this was in the CC section. I'll post it anyway since it doesn't use anything that CC doesn't have.

    http://dl.dropbox.com/u/5426011/examples%208/fill.capx

  • Add an "every tick" event at the end of the event sheet with a "scroll to Camera" action. That removes the major jitter.

  • Just use the "Compare instance variable" condition to pick a certain instance.

    The event will look like this:

    Sprite: testvar=1

  • I was going to say that you would need to use events for that but then I found a solution:

    for i in range(5):
       System.Create("chain", 1, Sprite.X + i*32, Sprite.Y)
       SOL.chainPhysics.DisableCollision("Sprite")
       if i == 0:
          SOL.chainPhysics.HingeToObject("Sprite",0,0)
       else:
          prev_chain.HingeToObject("chain",0,0)
       prev_chain=SOL.chainPhysics[0]

    It attaches the first link to the sprite object.

  • Try

    execfile(System.AppPath + 'Data\py\array.py')

    or

    exec(open(System.AppPath + 'Data\py\array.py'))

    instead.

  • This will work just like zeropad(n,8):

    left("00000000", 8-len(str(n))) & n

  • Here is a basic way to do it:

    Every Tick:

    + Sprite: set X to: Sprite.X + 1

    Sprite: is overlapping Wall:

    + Sprite: set X to: Sprite.X - 1

    If the motion is more complex another way to do it would be to save the sprite's x,y position in variables before moving the sprite. Then if it collides with a wall you can undo the motion by setting the sprite's position to the values in the variables.

  • I haven't opened your capx but here's an idea to do the sliding of the tiles.

    1. When you start dragging store the start position, and the x,y distances to the empty space.

    For example if the tiles are spaced every 100 pixels:

    empty above: x,y distances= 0, -100

    empty below: x,y distances= 0, 100

    empty left: x,y distances= -100, 0

    empty right: x,y distances= 100, 0

    2. Then while dragging contain the tile's position from the start position to the x,y distances.

    ex for x:

    start_x + clamp( Mouse.X - start_x, min(0, x_distance), max(0,x_distance))

    3. On the end of the drag just snap the tile to the grid.

    Example capx:

    http://dl.dropbox.com/u/5426011/examples%208/9tile.capx

  • Doesn't the "rgbaAt" expression do the trick?

    There are other implementations of flood fill that don't use recursion:

    http://en.wikipedia.org/wiki/Flood_fill

    Here I used the array object to implement a queue to keep track of what points to fill next.

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

    /examples%208/floodfill.capx

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound