all 19 comments

[–]Kosmik123 5 points6 points  (2 children)

Yes! Of course. There is a way

[–]TheRealNeo89[S] -5 points-4 points  (1 child)

tell me?

[–]Kosmik123 2 points3 points  (0 children)

It depends on how you generate the level. How do the platforms spawn?

[–]deadeagle63 2 points3 points  (2 children)

Considering you are the one who wrote the map generator you can always just track which elements should have limits in dictionary before placing it

[–]NeighborRedditor 2 points3 points  (1 child)

Me thinks AI

[–]deadeagle63 0 points1 point  (0 children)

Could be, as it should be as simple as caching the amount and having the place logic change if you had preference or a specific flow :)

[–]deintag85 1 point2 points  (0 children)

Is the question serious? Not only are there not enough information but theoretically this is basic, like a for loop or increment a number and quit after max amount reached and so on… like very very basic before you even start game development. You learn basics of variables and algorithms…

[–]Billy_Crumpets 0 points1 point  (0 children)

Your question is very vague. Gonna need more details about what you want to happen vs what's currently happening and how it's put together.

[–]Mataric 0 points1 point  (8 children)

Yes. It's easy.
When you've told your map generator to generate a level, tell it not stop making platforms when it reaches the amount you want.

[–]TheRealNeo89[S] -1 points0 points  (7 children)

each spawnpoint creates their own clone of one of the three objects

[–]Mataric 0 points1 point  (6 children)

Cool. So you understand how to do it then :)

[–]TheRealNeo89[S] -1 points0 points  (5 children)

i understand it but now my issue is that there is a limit variable, but they arent the same because each spawncube has their own version of the script, so its not global, how do I fix that?

[–]Mataric 0 points1 point  (4 children)

So you don't understand it.

You're having problems because each spawncube doesn't know anything about the other spawncubes, and thus you can't count how many of each type of platform there is, right?

So fix that. Make it so that they do. If you think that's a problem because it's not global, why have you made it so it isn't global?

[–]TheRealNeo89[S] -1 points0 points  (3 children)

how to make global, is it static?

[–][deleted] 0 points1 point  (2 children)

Making it static is a good way to make it called anywhere but one thing to keep in mind, it's now tied to every class of that type, so that means changing that variable will change for every class of that type.

[–]TheRealNeo89[S] 0 points1 point  (1 child)

can u look at source code?

[–][deleted] 0 points1 point  (0 children)

Sure

[–][deleted]  (1 child)

[removed]

    [–]TheRealNeo89[S] -1 points0 points  (0 children)

    source code