How to make blocks appear one after another?
Is there a special way of creating platform blocks one after another, after a certain amount of time in the game, like in a puzzle sequence for platforming games?
Does it require more than one generator, or can it be done with one generator in the objects list? I already have the blocks appear in the game, but they don't work in a sequence. They all appear at once. I was thinking there would be some way to make them work without having to duplicate any of the objects in the frame editor.
Re: How to make blocks appear one after another?
If they are active objects, you can use the "Spread Value" function in the blocks object, and then have a counter/global value that will constantly increase up to a certian value, and then you make an event:
(Blocks Object)Alterable Value[the spreaded value] <= Counter/Global Value :: Visibility->Make Object Reappear
That should make them appear one by one every time you add 1 to the counter/global value. To make them dissapear, simple do the same except use the >= operator instead of the <= operator.
Re: How to make blocks appear one after another?
Umm.... Im not exactly sure how the spread value works. is there an example somewhere I can look at?
Basically, they all have like absolute positions on the level, or part of the stage. They just have a timed sequence of appearing. Much like those appearing/dissapearing blocks from the mega man games. Trying to make them have a sequence like that.
Would help if I had something to look at, to get an idea whats going on. ;)
Re: How to make blocks appear one after another?
http://www.create-games.com/article.asp?id=1798
Re: How to make blocks appear one after another?
Well, spread value is just that. It starts at the base (which in this case I believe it is 0) and assigns that value to one of the objects and adds to it (So one object would have 0, the next 1, and so on) Try picturing numbers on each block. That basically sums it up. Then what we're doing is taking the counter, and every so and so seconds or whatever increasing it. So, if the counter = 0 and you are using the event
counter = Alterable Value A("block")
-Block: Appear
the block that was assigned 0 in the spread would appear. And when the counter equals 1, the block assigned with 1 would appear
This, of course, won't work if you don't have actives but you have backdrops instead.
Re: How to make blocks appear one after another?
actually... they would only be platforms you can stand on when they are visible. When they disappear again, you wouldn't be able to stand on them.
So, are you mainly talking about create active object named block1, change alt. value A of that to 1, create another active object in file, named block2, change alt value a to 2 and so on?
Re: How to make blocks appear one after another?
No, just using duplicates of the same object. "Spread value" gives duplicates different alterable values in sequence starting at the number you tell it.
Re: How to make blocks appear one after another?
Quote:
Originally Posted by RickyRombo
Well, spread value is just that. It starts at the base (which in this case I believe it is 0) and assigns that value to one of the objects and adds to it (So one object would have 0, the next 1, and so on) Try picturing numbers on each block. That basically sums it up. Then what we're doing is taking the counter, and every so and so seconds or whatever increasing it. So, if the counter = 0 and you are using the event
counter = Alterable Value A("block")
-Block: Appear
the block that was assigned 0 in the spread would appear. And when the counter equals 1, the block assigned with 1 would appear
This, of course, won't work if you don't have actives but you have backdrops instead.
Well, I read through the tutorial on dailyclick, put start of frame, spread 1 to value a "block", and i did what you said counter = value a ("block"). and i had like 4 or 5 blocks on the screen and they ALL appeared at the same time. Maybe I am missing something? Or maybe I don't quite get the concept of spreading values. @_@
The tutorial mentions about giving enemies damage values (by giving their alt values a #, and when bullet hits enemies, decrease value. value < 0 destroy enemy, etc). i already know that much. But it says spread values has same concept? I donno. I still can't get this to work right after reading it. X_X
Re: How to make blocks appear one after another?
It is used to ID objects.
If you have multiple objects each of them gets a unique ID.
alt value a = Spread value(0)
First object start with alt value 0
second with 1 and so on until each object is adressed.
Re: How to make blocks appear one after another?
counter = alterable value a ("block") should be
Alterable Value A of ("Block")=counter
Edit: it won't select a block otherwise ;)