Coin-coin le Canapin's Forum Posts

  • I assume his enemies move with the bullet behavior and aren't shooting bullets.

  • So you want to pick 2 instances and handle them separately ?

    You can do :

    pick objectX by comparison

    for each objectX

    And you just have to add sub-conditions to separate them like : if UID = 0… then, if UID = 1… then, Or maybe just using an incrementing variable).

  • dt is a system expression:

    [quote:ozionj0k]dt

    Return delta-time according to the object's own timescale. See Delta-time and framerate independence for more information.

    But I don't still really understand what effect you want to achieve. That said, english isn't my native language so…

    ---> enemy : set speed to 0

    It would be easier to help you if we can have a link to your actual project.

    Check my capx, is it what you want to do ?

  • Nice system. The performance should be fine, just loop through the tiles in a square that bounds your explosion radius. You could have a set of jagged-edge sprites around the holes instead of slopes, & could probably get away with a larger tile size in that case (since you're faking extra detail & won't see squares).

    Hi,

    I didn't understand your jagged-edge sprites thing (my english isn't very good).

    However I did a try while looping through the regarding blocks :

    [attachment=1:2r1nd3ux]slopesinholespic.png[/attachment:2r1nd3ux]

    The player made a hole on top of it and my events created a nice slope on the upper left corner.

    But that's very slow and my computer has an unpleasant tiny freeze when the hole is created.

    You can try it here : http://canapin.com/construct/tolilo/05/

    And that's with only one slope ! I didn't make the three other ones.

    Here are my events :

    [attachment=0:2r1nd3ux]slopesinholes.png[/attachment:2r1nd3ux]

    It starts to be complicated !

    I'm not sure why it is that slow : when the player shoot on a straight wall, it select all the blocks on the radius border : that makes around only 10 blocks, and we test for the presence of two blocks for each of these blocks. That makes my events iterate over 20 blocks.

    Or maybe I have an issue in my loop. Maybe the "for each block" in my second function ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for your reply

    Well, I never tried but I don't know why, I assumed that pick and for each couldn't be used together. And it caused me a lot of issues these past years ! Shame on me

  • Oh, nice, I didn't know this expression

  • Maybe it would be a better option to use a Timer behavior on the enemy instance instead of using the "every X seconds" system condition ?

    Can you provide a capx ?

  • Hi.

    I would like to pick some instances by evaluate, then iterate over the returned elements them to do some specific actions (like verifying if there are other instances at fixed coordinates around them).

    What's the best way to achieve that ? Should I use a function or an array or something like that or can I manage to do this with basic conditions ?

  • Like this ?

  • round(random(3))*90

  • for each [family] -> [family] set angle to random(360) ?

  • Thank you

    The next step will be automatically adding and removing slopes in real time on holes created by the player. Not sure how much it will slow down the game however.

  • Good to know, thanks.

  • I'm definitely interested in knowing how u did that event on the slopes!

    In fact, i would like to see the whole capx (if u dont mind), because u have done a great job here.

    Those regenerative walls are truly nice!

    I guess it's for Fatal Revenge ?

    Short version :

    I first draw my level with tiles because it's way faster than drawing my level with actual sprites.

    Then a loop replaces all the tiles by blocks sprites. During this, for each tile it tests for every other tiles in corners and replace some with slopes (as different sprite frames) if necessary.

    [attachment=2:1fs2rpgn][/attachment:1fs2rpgn]

    capx : [attachment=1:1fs2rpgn][/attachment:1fs2rpgn]

    You'll need the platform+ behavior.

    I also made little changes by adding slopes in inner angles (just the bottom ones, not the upper ones) since I uploaded the screenshot (click to view the full image) :

    [attachment=0:1fs2rpgn][/attachment:1fs2rpgn]

    It can still be improved to round single squares but it will need about 5 more frames and more events.

  • nimos : thank you for this workaround, I'll try this

    linkman2004 : I have a geforce GTX 560M. It can run Skyrim, but not too much brightness in Construct 2. Meh.