Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: HeathClose on August 13, 2017, 02:15:07 PM
-
ok… I’m stumped…
I need to save checkpoints. That part I have all figured out. It works just fine. Player continues on the right level in the right spot... but...
The problem is if I load the character up at say the 3rd of 7 checkpoints, I also need a way to know which checkpoints to deactivate (which ones were already collected), and which doors to deactivate (so the player isn’t locked out of passages they already unlocked). Not every level has 7 checkpoints and 7 doors to unlock. These change level to level.
I figure I would Easy Save the checkpoints as an array at each level, and as soon as they solve that level, delete the saved array, and build it again on the next scene. That way, when they load into say level 5, but have yet to touch a checkpoint and unlock the door, they will start at the beginning.
I’m thinking the solution might lie in either arrays or array maker, but not exactly sure how.
I thought if I make an object array, and keep a master array on each level to pull from, I could compare the saved array to the master list, and deactivate those objects that don’t appear in the saved array after comparison.
Easy Save has Load Object Array
(https://www.dropbox.com/s/fmnvy2wovqp08md/Screenshot%202017-08-13%2013.00.44.png?dl=1)
This asks for a size. But that will change all the time, so I don’t think that’s going to be much help.
Easy Save has Array List Easy Load
(https://www.dropbox.com/s/jv8xrtnao3kzpgp/Screenshot%202017-08-13%2013.04.55.png?dl=1)
But I don’t see any Array Maker actions that would allow me to compare the list to the master array variable on the empty I'll keep in every scene.
How can I do this?
Is there another solution I am not seeing?
-
Hi,
Maybe you could use the 'iterate' action to loop thru the array.
Use the index on the iterate and use an "array (List) get" on each array,
get the result and use a compare action, then loop back to iterate.
also set the index out of range (failure event) as both array sizes are different
-
Thank you for the suggestion... but I'm not quite sure what you mean... so I tried to find this Iterate action but I don't see an Iterate action anywhere in the list or on the ecosystem
-
Hi,
I just checked and iterate is available on the Ecosystem :)
maybe you overlooked it :)
-
Hi,
I just checked and iterate is available on the Ecosystem :)
maybe you overlooked it :)
Could you take a screenshot of what it is called... the only action on the ecosystem that begins with 'It' is an itween action
-
Here you go :
(https://cdn.pbrd.co/images/GFIdarn.jpg)
-
This does not show up for me... what is happening here?
-
Hold on... I just updated my ecosystem to 0.5.3 and now I see it...