Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Cratz on August 12, 2016, 07:35:40 AM
-
Guys I've been trying to figure this out for so long. If anyone has any clue of how I can accomplish this please let me know how. If you need further details please let me know. Thank you
-
Create an int variable to mark the next free position (lets say you call it freePos). Set its starting value at 1 (1st position).
Whenever you click a button check freePos to see where to position the next object, then increase freePos by 1...
-
Hi Can I get more detail please? How will it know if the "First position is occupied, or second position and so on?
-
I'd use an Array. If its empty that means position 1 is free, and you add to it.
Next time you'll count it and get 1, so you add the next one to that index.
If you're super new and that sounds confusing, go through the Arraymaker tutorials before doing anything.
However, Mutajon's suggestion is simpler and would also work, but you wouldn't be able to go back and get those values by their corresponding slots later on
-
How would you use arraymaker to accomplish this?
-
How would you use arraymaker to accomplish this?
Hi,
It should be fairly simple once you get fammiliar with arrays. I think Terri mostly gave a good overview of how to select the objects:
use an Array. If its empty that means position 1 is free, and you add to it.
Next time you'll count it and get 1, so you add the next one to that index.
If you're super new and that sounds confusing, go through the Arraymaker tutorials before doing anything.
So basically just make an array and add the objects when you press the corresponding button. Then where you display the objects, make it get them from the array in order and display them where you need the objects displayed. So index 0 is displayed in position 1 and so on.
But first go through the tutorials so that you know how arrays work: https://www.youtube.com/playlist?list=PL1EwQda_5HM_n8MEaBGfcXLNpmL8qBqV1
Good luck with it!
-
Nice! I will learn as much as I can. Thank you!