dop2000's Forum Posts

  • In your last screenshot Turn variable will only increase for one instance, that has been created.

    See examples in my previous comment.

  • What family do you spawn? The same "TilesObj.." family?

    When you create a new instance (object or family, doesn't matter), this instance is automatically picked in this event. So all other actions in the same event will affect only one newly created instance.

    However, on your screenshot you are creating PotionObj object. But then you are changing the variable for TilesObj family, which is not picked, so the variable is changed for all existing family instances on the layout..

    Example:

  • Boolean is true => spawn coin, add 1 to family 1 var, set boolean to false.

    Boolean is true => spawn family 1, add 1 to family 1 var, set boolean to false.

    Both of these events should be the exact same.

    No, in the first case the variable will be increased for all family instances, not the one that you've just created.

    .

    If you are creating a new "Coin" instance, you need to use "Coin" in other actions in the same event.

    If you are creating a new "Family" instance, you need to use "Family" in other actions in the same event.

  • Yes, it can be done much easier. Remove the camera sprite and change your events like this:

  • it copies instead of a transparent background to white.

    This problem existed in C3 since day one. The only option is to save as png.

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

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