dop2000's Forum Posts

  • Well, they work well in some games and easy to grasp for beginners. But they are obviously not compatible with Tile Movement behavior.

  • Another simple method is to spawn invisible "waypoint" sprites on player position every 0.5 seconds or so. Then you can use MoveTo behavior for the follower to move along this path.

  • You can use distance() expression:

    If distance(Player.x, Player.y, Mouse.x, Mouse.y)<50, then set angle of motion.

    However, if mouse cursor is not moving, the player will keep moving back and force within 50 px of it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, you can't have image points on tile map. What you can do is to use a temporary invisible sprite the same size as tile, and define image points there. Place this sprite on the tile and read image point positions from it.

  • 1. How do I make the dash unavailable for a determined number of seconds

    Use Timer behavior. Before starting the dash, check that timer "cooldown" is NOT running. When starting the dash, start timer "cooldown".

    2. Player.Timer.CurrentTime("cooldown") will give you the elapsed timer time.

    So, for example, if cooldown time is 3 seconds, you can decrease the dash bar from 200px to zero like this:

    Bar Set width to ((3-Player.Timer.CurrentTime("cooldown"))/3)*200

    1. I don't know how to implement the items in such a way that it spawns precisely on top of the concrete pool flooring.

    The easiest way is to add invisible "Spawner" sprites where you want your items to be created. Then pick a random Spawner and spawn an item.

  • tarek2, yeah, took me a while to figure out that after you do "Simulate control", condition "Is moving" will still be false until the end of the tick. Not sure if this is a bug, but other behaviors (8direction, platform) start moving in the same tick.

  • steve1984 I polished my version. It works correctly even if you press multiple buttons, there is no jittering and animations are changing smoothly.

    dropbox.com/s/218jgm3ps3dzix5/PushBlockTest_dop2000_2.c3p

  • Easy - don't use these behaviors.

    Make a barrier around the layout with solid tiles.

  • Here is my version, I managed to make the rocks and the player move smoothly.

    dropbox.com/s/kfvczdlqplt5hiu/PushBlockTest_dop2000.c3p

    It's a useful demo, will it be ok with you if I upload it to my website?

  • Don't make the player and enemies solid! Set "Bounce off solids=yes" in Bullet behavior. Also, you don't need Bound To Layout, since they will bounce off solid tiles.

    Enemy AI is a difficult topic, I suggest studying tutorials:

    construct.net/en/tutorials

  • If they are consecutive, or named like MyLayer1, MyLayer2, MyLayer3..., you can do this in a loop.

    For "n"=1 to 12 : Set layer "MyLayer"&loopindex scale to 2

  • I think the only option is to loop through all instances with "For each":

    local variable averageDamage=0
    local variable sumDamage=0
    
    Enemy isAttacking=true
    	For each Enemy : add Enemy.dmg to sumDamage
    
     Set averageDamage to (sumDamage/Enemy.pickedCount)
    
  • You can convert coordinates between layers using these monstrous expressions:

    CanvasToLayerX("Player", LayerToCanvasX("HUD", x, y), LayerToCanvasY("HUD", x, y))

    CanvasToLayerY("Player", LayerToCanvasX("HUD", x, y), LayerToCanvasY("HUD", x, y))

    These will convert HUD layer coordinates (x,y) to Player layer coordinates.

  • There are two sprites in that demo. Tiled Movement is just another example, you can use 8-direction, or Bullet or some other behavior. The idea is the same - when two keys pressed one after another, increase behavior speed.