dop2000's Forum Posts

  • I have an old demo that is similar to what you want. It's not perfect, but you can probably adapt it for your game.

    howtoconstructdemos.com/top-down-view-shooter-collect-swap-and-fire-different-weapons

  • If you can have multiple instances of each enemy type, then you need to link health bars to enemies by their UID. Add all enemies to a family "Enemies". Add enemyUID variable to the health bar sprite.

    Enemies on Created 
    	-> Enemies spawn HealthBar
    	-> HealthBar pin to Enemies
    	-> HealthBar set enemyUID variable to Enemies.UID
    
    
    Enemies on collision with Bullet
     -> Enemies subtract 1 from health
    	
     	HealthBar compare variable enemyUID=Enemies.UID
    	 -> (update health bar)
    
    

    .

    Another option is to create a separate health bar object for each enemy type in your game. Then you can simply add each health bar into a container with each enemy, and they will be linked automatically, no need for instance variables.

  • Usually for HUD/UI layer you need to set scale rate and parallax to 0%. Everything else will be scrolling and scaling, except your UI elements.

    It looks like you have scroll at (0,0), try setting scroll to (427,240)

  • Your link doesn't work. If you are setting one item, try using "On item set" event.

  • 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.

  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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