artheads's Forum Posts

  • So there is a condition at 105 that enemy has LOS in that event which you've decided to cut off in the screenshot?

    No, all the events for this effect is under [if weapon = "shock"], event 105 is for another weapon. However I already solved the problem by creating these two beams [on "enemy spawn" function] and then set it invisible with width zero. Then when the enemy fires, I take further action.

    Thank you guys for your answers anyway!😄

  • ...you want it to create just 2 beams only. The question is when?..

    So, I have a few enemies on layout. They can shoot when they see the player (instance boolean "is shooting"), so when some of the enemies "is shooting" and their weapon is "shock" - they spawn two beams (each of enemy who shoot with "shock").

  • ...because one needs to run every tick and one doesn't...

    Sure, but how to call the event block with "For from 1 to 2" to run once per each instance that meets the condition at the top, even if I will split these events up? The code on screenshot below creates beams endlessly as well...

  • Use boolean instead of trigger once. So the logic is when a boolean switched state the action won't executed further more.

    How do you see it in the context of my screenshot above?

  • The top condition is technically a for each

    If you mean filtering by instance variable at the top - yes but, the small loop "For" below that create two beams runs indefinitely OR create two beams only for a single instance when used with trigger once.. Instead I need to run this small "For" loop ONCE FOR EACH of enemy_top... So two beams are created for each enemy_top...

  • The problem: I can't realize how to create strictly two instances of laser beam FOR EACH enemy_top. Enemy tops are filtered by instance variable "shock", then each of them must create two beams. It would seem simple, but... The code:

    This is one of the code variations that doesn't work as expected.

    Tagged:

  • Here is an example how to do this with tiled background

    Oh god! thank you ))

  • I was thinking of using canvas too. I'll play around with it. Thanks for the idea!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi everyone! I'm wondering how to create such a cool laser/blaster beam effect? It is unlikely done with tiled background or 9-patch as I did laser beams before. Any ideas, colleagues?

    Tagged:

  • Check your array in debug mode, maybe your events are changing the width of the array.

  • Thanks for this idea. It can be done easier:

    However it only erases just a "white square" around a player. Is there a way to make it more like a "pixelated" circle, like the one below?

  • Hi, thanks for response, but I barely understand you. How do you imagine this: [emptyTile]+1 this will return just another tile e.g. my empty tile is 1, so 1+1=2 (2 is non-existent tile).

    UPD: Your idea will work if modified, however it makes a square but not a circle as I'm trying to implement.:

    https://i.postimg.cc/8cg6X7KL/tilemap-fow.png[/img]

  • I'm trying to set "fog of war" made from tilemap (single black tile 8x8), then erase these tiles around player when he moves to reveal the visited area. I found an example by R0J0hound that uses 1px tilemap, but can't figure out how to increase the tile size to 8x8?

    dropbox.com/s/4sv6lztqwvtxbl5/destroy%20terrain.capx

  • Am I the only one? )