justifun's Forum Posts

  • Check out this example

    scirra.com/tutorials/746/auto-tile-using-sprites-arrays-and-a-bitwise-method

    You can read up more about it on google by searching for "tilemap bitwise"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Any floor that the player will jump through should only have a "jumpthru" and NOT a solid behavior on it.

  • - One solution for the example you brought up, would be.

    If your player becomes invincible or able to walk over lava etc., you could run a loop that goes through all "obstacles" like lava etc, and places an invisible sprite the same width/height as your obstacle temporarily over them. And then destroy them again once the invincibility wears out.

    Compare 2 values (player.invincible = 1)

    ->For Each "Obstacle" Create object "tempblock" at Obstacle.X, Obstacle.Y

    --->set tempblock.width = obstacle.width

    --->set tempblock.height = obstacle.height

    Compare 2 values (player.invincible = 0)

    tempblock.destroy

  • When you are checking which animation you are playing, you can use the "collision at offset" event and check a little further below your player. eg: self.y-50 to see if you are still on a floor,

    sounds like its repeatedly colliding/not colliding because of the rotations.

  • even if the characters are the same sprite, each instance will have different UID's so you can sort them that way.

    the easiest way is to get the plugin Zsorter

    then use

    every tick -> zsorter Sort all objects on layer 0 by Y

  • There's a great behavior someone wrote called "litetween" grab it and have a go. It does all of the things you want it to really easily.

  • This works.

    dl.dropboxusercontent.com/u/403350/egg.png

    add a 8-dir to the player character

    add solid to the egg

    every tick - player -> rotate 2 degrees towards (mouse.x, mouse.y)

                 player -> move 1 pixel at angle (angle(player.x, player.y, mouse.x, mouse.y)

    it will constantly walk towards the mouse as it moves around, and bump up against the walls of the egg without overlapping.

    see my example file.

    dl.dropboxusercontent.com/u/403350/egg.capx

    is that what you want?

  • Can't get your link to work :(

  • Yes, the way you have it setup right now, you are "picking" every tower to add the upgraded level to.

    There's a few different ways to pick the correct tower you want to upgrade.

    One suggestion would be to create an instance variable on the button object. Lets call it "TowerUID".

    On line 3 where you spawn the upgrade button. set the TowerUID variable to "trt_basic.uid"

    eg: (btnUpgrade - set value "TowerUID" to trt_basic.uid

    This now lets the upgrade button know which tower it belongs to.

    Next, down on line 28 where you have the upgrade logic....

    You need to create a sub event that picks which tower to apply the upgrade to.

    So add a sub event and use "Pick by evaluate" -> trt_basic (as the object) and in the evaluate line put trt_basic.uid = btnUpgrade.towerUID

    Then for the action, move the 2 actions you have for the trt_basic (add 1 to level) and (set turret range), down to this new sub event, so that it only effects the "picked" turret.

  • For making the actual artwork for a game, you'll want to search for tutorials on youtube etc.

  • The code for spawning the monsters has to be a sub event of where you picked which one you want to spawn.

  • Simply add another condition to your spawning code that says

    Compare 2 values -> Enemies.count < 20

    Thus it will only spawn enemies if the total amount of enemies active are less than 20.

  • Simply place them all next to each other like this. (assuming you have 6 pieces)

    on layout start

    part 1 - set position 0,0

    part 2 - set position part1.width, 0

    part 3 - set position part2.width, 0

    part 4 - set position 0 , 0-part4.height

    part 5 - set position part4.width, 0-part2.height

    part 6 - set position part5.width, 0-part3.height

    this puts them in a 2x3 grid

    im sure there's a fancier way to do it with an array, but im not as good that those.