Snalec's Forum Posts

  • Would it be okay if I added more than four though? I was thinking of having some that were maybe ten or more high.

  • Now I'm trying to make it more modular, so that there can be large stacks of goombas without lots of repeat events. I reworked the top event so that instead of creating goombas at the start of the layout, the top goombas are placed in the editor and then are made into a family at the start of the layout.

    Now I'm trying to get the second part more modular. As it is right now, there needs to be falling events that correlate to each possible height the stack can be, if that makes sense. Looking at the file it's probably easier to understand what I mean.

    https://drive.google.com/file/d/1fiwnQcIi-rd9cpqKsXtfJWk5-ZGdMEpG/view?usp=sharing

    I'm trying to figure out a way that it could be condensed into one, but I haven't had much luck with it.

    I guess just making events for each stack height wouldn't be too bad, it's just lots of copy and pasting, but do you think it could possibly lead to performance issues? Especially if there are lots of stacks in the level.

  • I actually figured it out. Here's a link to the file for if anyone ever needs it.

    https://drive.google.com/file/d/1xvx1mGOmloY-enNWVpF6JERpLv3_jP7O/view?usp=sharing

  • I have another question. Hopefully it will be the last one. Would it be possible for them to stack more than three high? I've been messing around a bit with the file trying to make it stack more. Maybe something with that second section would need to be modified, since it says in your note that it doesn't reposition the goombas if there are two children. I just can't figure out what changes need to me made though. Sorry to keep asking questions. You've already helped so much and I really appreciate it!

  • Thanks!

  • Sounds good. Thank you!

  • Gotcha. I missed that it was comparing distance between the top image point of the bottom Goomba and the botttom image point of the top Goomba.

  • I just took a look at it, and I think I get it. I'm going to try to implement it into my project later and see how it goes.

    One thing I don't quite get is the hierarchy reset section. If I'm understanding the pick condition right, it's looking for the distance between the bottom goomba and the top goombas, and then seeing if the distance is less than two. Isn't that distance going to always be more than two pixels though. I'm probably just seeing it wrong.

    Thanks again. This is really interesting. I'm learning a lot from it.

  • I have one more question. I just implemented slopes into my game, and when the base enemy travels up a slope, the enemies stacked on top of it don't adjust to the elevation change. Is there a way to keep the enemies a certain relative distance away from the base enemy without interfering with the falling mechanic? I tried pinning but there were issues with that.

    Thanks again

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks! I think I get it now. I really appreciate your help!

  • Awesome! Thank you so much. I have a few questions about it.

    Does overlapping at offset just mean that, in checking that collision, it moves the collision ten pixels down?

    Also, with the formula at the end, I don't quite know all that's happening there but I think I get most of it. I'm guessing the 100 in there is the height of the Goomba. I'm not quite sure about the 10 though. Does that correlate to the 10 in the overlapping at offset condition?

    Here's that formula for reference: lerp(Self.Y,(Self.Ypos+100),dt*10)

    Thanks again!

  • https://www.youtube.com/watch?v=VGKA3khdN7I&ab_channel=ericfortesTV

    Here you go. They don't really do it in this level, but Mario can throw a shell or projectile at a Goomba in the middle of the stack, which would cause the Goombas to fall onto the ones beneath it. For example, if there were five stacked on top of each other, and the middle one was destroyed, the top two would fall onto the bottom two. Hope that makes sense.

  • Hello,

    Right now, I'm trying to implement an enemy stack, where multiple enemies will be standing on top of each other to form a tower. I think lots of games do this, but for example one would be Mario Maker, where you can stack up a bunch of Goombas or other enemies.

    I've tried a few things, but they haven't really worked. If anyone has done something similar before or knows how to do it, I'd really appreciate your help!

    Thanks,

    Snalec

  • Thanks! Turns out I really didn't need the for each stream condition. Taking those out of all the stream events got the frame rate back to normal.