Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Preface: I would like help with a way to code this, not a link to a template.

Like in Monster Dash, I want to be able to spawn platforms that are separate from each other. I do want the platforms to be randomized (different sizes). I need to know the most efficient way to randomly spawn different sizes/variations of platforms and make them equally separate from each other.

Thanks in advance and any leave a comment if you have any further questions/need more detail. Thanks


  • Braydon_SFXBraydon_SFX Posts: 8,966Member, Sous Chef, PRO, Bowlboy Sidekick GameSalad Employee
    Couldn't you just have a boolean, which when true, changes the size and Y position of an actor? That way you could have several "Platform" actors and they would change position and size each time you tell them to?

    Maybe that's not what your asking for, though.
  • No it won't work to change the size because of how it is setup. Plus I already have a small, medium, and large size for the platforms. I have to do it as described. I just need to figure out the most efficient way to do it.

    Currently I'm doing it where the platform hits a certain X coordinate, it randomly chooses a platform, spawns it, but I'm having issues.

    Sometimes when the platform destroys it disables the same platform of its kind's rules (preventing respawn).

    That's why I'm wondering what the best way to do it is.
  • DanDaMan123DanDaMan123 Posts: 216Member
    USING CAPS LOCK FOR YOUR THREAD TITLE WAS AWESOME THANKS ;) (seriously it's not necessary)

    to answer your question though, there are many, many, ways to do it. One way is to have an actor that detects if it is touching a platform. If it is touching one, then platTouch = true, otherwise platTouch = false. Then, in your actor that spawns platforms, it will be if platTouch == false then spawn (you could have a timer that said after .3 seconds spawn if you need more delay) and it will spawn it over the sensor actor (the one that determines platTouch). platTouch will become true because it's touching a platform and then once the platform moves away platTouch will become false and it can spawn again.
  • Yeah I always do that. I figured it would get people's attention ;) but maybe not...

    Yeah that could work. Triggering it based on whether the actor is touching the platform is a good idea. Thanks.
  • Still open to suggestions if anyone has another way of doing this.
This discussion has been closed.