1 decade ago by faytmye
Hey guys, I've been trying to figure this one out for a while now but i've had to luck whatsoever. I'm still new to javascript and Impact so apologies if I don't fully understand.
Essentially, I'm trying to get LocalStorage working but the problem exists when I switch menu states using Director after pushing new lines into the arrays/storage. This is the gameplay flow broken down.
1. Array of 4 items are put into LocalStorage using Stringify. (These are default items that the player starts with)
2. LocalStorage parses the array and draws all four items correctly.
http://www.youtube.com/watch?v=c53jzt8y-1c&feature=youtu.be
I've added the two main files below if someone could check them and enlighten me on the problem. I know the code is pretty sloppy but I'm still learning and using what works for me :P
https://github.com/faytmye/rpg-card
Essentially, I'm trying to get LocalStorage working but the problem exists when I switch menu states using Director after pushing new lines into the arrays/storage. This is the gameplay flow broken down.
1. Array of 4 items are put into LocalStorage using Stringify. (These are default items that the player starts with)
2. LocalStorage parses the array and draws all four items correctly.
http://www.youtube.com/watch?v=c53jzt8y-1c&feature=youtu.be
I've added the two main files below if someone could check them and enlighten me on the problem. I know the code is pretty sloppy but I'm still learning and using what works for me :P
https://github.com/faytmye/rpg-card