dop2000's Forum Posts

  • You can have many layouts in your project, but only one layout can be active at a time. You can't display two layouts on one screen.

  • I believe the problem is in "Enemy State Dead" group. Trigger Once condition doesn't work per instance. And you shouldn't place it as a sub-event. And "On any animation ended" also shouldn't be there..

    Try changing the code like this:

    It's still not ideal, because event 16 is checked on every tick, and if you have lots of events like this, it's bad for performance. So I suggest moving all actions into the function (if HP<=0, then disable collisions, start dead animation etc.)

  • There are a few tutorials:

    construct.net/en/tutorials/how-to-css-style-buttons-sliderbar-etc-687

    construct.net/en/tutorials/css-your-buttons-and-textboxes-818

    But I really recommend making the progress bar with a sprite, it's so much easier and the result will be better.

  • ProgressBar is a Form object, you can style it with CSS, but it's not an easy task. Besides, form objects have lots of other issues with scaling, scrolling, z-ordering etc.

    It's much better and easier to make your own progress bar with a sprite or tiledbackground object. You only need one event:

    Set Bar width to (Player.Stamina/Player.MaxStamina)*200

  • Your mistake is that you are adding 1 to existing zombie instances, before new zombies are spawned.

    You need to add a global variable ZombieBaseHealth and add 1 to it with every new wave. In the event where zombies are spawned add an action "Zombie Set Health to ZombieBaseHealth".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use trim() expression to remove all spaces and line breaks from the beginning and end of the string:

    Array set value at Array.CurX to trim(tokenat(Ajax.LastData, Array.CurX, "|"))

  • The common trick to make a split screen is using the Drawing Canvas. But in your case it may be an overkill. I think it will be easier to simply scroll two backgrounds separately (instead of scrolling the layout), while keeping the players stationary.

  • See "Blend Modes" template in Construct 2. You might need to put both the mask sprite and the tilemap on a separate layer and set "Force own textures=yes"

  • Add Flash behavior. Player On collision with bullet -> Player Flash.

  • Make the BlockPerimeter sprite visible, it will help to understand how the code works. When Enemy is overlapping 3 instances of BlockPerimeter, this means a corner where it needs to turn right. When it doesn't overlap any BlockPerimeter sprites, it's a corner to turn left.

    It's a pretty specific demo, because all sprites need to be places with pixel precision. So it will probably not suit your game, but it may give you some ideas.

    • English

      Since blocks can't be rotated in your game, you can do this:

      in a loop try to place the block to each position on the board, performing the same check from "Checking" function. If the check is successful, stop the loop. If the loop has ended and a suitable position was not found, the game is over.

    • На русском

      Когда создана фигура, запускай цикл для каждой клетки на доске, в котором проверяй, помещается ли фигура в данную позицию. Можно использовать такую же проверку, как в функции "Checking". Если фигура помещается в свободные клетки, можно прекратить цикл. Если цикл прошел полностью, а фигура так никуда и не поместилась, то конец игры.

  • No, that was a different problem. Sometimes you upload an image, it gets inserted with "IMG" tag, but it doesn't appear in the post, and you have to edit it and re-upload the image again. This is still happening from time to time.

    Today I can't upload any images at all. I select a file, press "Upload image" button and nothing happens.

    Tom, could you fix it please?

  • I made a demo for another post, take a look:

    dropbox.com/s/g61j043mgr1pkkn/SimpleStickingMob_dop2000_fixed.capx

    Another option is to make a path for each enemy - say, with small invisible sprites. Move the enemy from one sprite to another. You can define several instance variables on these sprites to control the movement, say to change direction, turn or pause.

  • Yeah, noticed the same issue. You need to create a post here:

    github.com/Scirra/Construct.net-website-bugs/issues

  • Yes, Rexrainbow has a great collection of addons for this! You can load csv data into an array, or work with it directly.

    construct.net/en/forum/extending-construct-2/addons-29/plugin-csv-csv2array-csv2dicti-41868