R0J0hound's Recent Forum Activity

  • Both are the same. To be able to draw the image it has to be in memory.

  • You mean will it make your game run faster? The most it would do is make the game download quicker if the file size is smaller. The speed of uncompressing might change but it doesn't matter since it's only done once and is not a bottleneck at all.

  • you could use a global variable and a loop. something like:

    every tick

    --- set global 'anykeydown' to 0

    for "" from 0 to 255

    key loopindex is down?

    --- set global 'anykeydown' to 1

    global 'anykeydown' equal to 0

    --- do stuff

  • Hi,

    I know this doesn't answer your question directly but I've found it's tricky to get that working good with collisions.

    One idea i've tried before that works well is to instead just keep track of how far each block should move.

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

  • If you want to create them every tick, you'll probably wan to destroy them all every tick first. You can also change the loops to go from -2 to 2 instead.

  • No problem. It was fun to make.

  • You can create objects in a formation by using two loops

    start of layout
    for "x" from 0 to 3
    for "y" from 0 to 3
    --- create sprite at (loopindex("x")*32, loopindex("y")*32) [/code:egxi6tbt]
    
    You can control where the topleft of the formation is by adding it in so say you wanted the top left to be (100,150) you could use (loopindex("x")*32+100, loopindex("y")*32+150).
    
    you can also make the formation get created around a center.
    [code:egxi6tbt]
    global number rows=4
    global number cols=4
    global number centerx=100
    global number centery=150
    
    start of layout
    for "x" from 0 to cols-1
    for "y" from 0 to rows-1
    --- create sprite at ((loopindex("x")-(cols-1)/2)*32, (loopindex("y")-(rows-1)/2)*32) [/code:egxi6tbt]
    
    As a final example you can store the row, column in the sprite itself and do this:
    [code:egxi6tbt]
    global number rows=4
    global number columns=4
    global number centerx=100
    global number centery=150
    global number offsetx=0
    global number offsety=0
    
    start of layout
    --- sprite: destroy
    --- set offsetx to (columns-1)/2
    --- set offsety to (rows-1)/2
    
    start of layout
    for "x" from 0 to columns-1
    for "y" from 0 to rows-1
    --- create sprite at (0,0)
    --- sprite: set column to loopindex("x")
    --- sprite: set row to loopindex("y")
    
    every tick
    --- sprite: set x to centerx-offsetx+self.column*32
    --- sprite: set y to centery-offsety+self.row*32
    [/code:egxi6tbt]
    That way you can move it around by changing the center.
  • To add the newt's reply, there's the "load" action to load a json. Also there's the Tilemap.TilesJSON to get the json.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The closest you can get with behaviors is probably this:

    Otherwise you'll have to get creative, maybe even do the motion with just events so you can make the rules about what is or isn't solid. But it's probably not simple.

  • add a variable to the enemy and call it direction and set it to 1.

    Enemy: x < player.x-100

    --- enemy: set dir to 1

    Enemy: x > player.x+100

    --- enemy: set dir to -1

    enemy: dir = 1

    --- simulate right pressed

    else

    --- simulate left pressed

  • Here's one way that works good.

  • Probably should try updating your graphics card drivers if you can.