As 2 save buttons!

Started by: Chimero | Replies: 0 | Views: 278

Chimero
2

Posts: 626
Joined: Jan 2012
Rep: 10

View Profile
Jan 6, 2013 1:34 AM #843486
I just started learning scripting n shit for games.
And found a tut on how to make an easy save button.
The coding goes like this:

on(release){
_root.pos = SharedObject.getLocal("game");
_root.pos.data.playerx = _root.player._x;
_root.pos.data.playery = _root.player._y;
}

Haven't tested it yet, and I believe it works and all, but this only registrates the objects position.
Does anyone know how to save different things like, score, or health, and how this would affect the load button?
Thanks a bunch <3