Actor starts with 5000 points
![Theodi](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hi!
I have an actor a little way up the screen which is on a timer which makes it fly down. It is supposed to start on 0 points, because as the player "taps" it the atctor goes up and points are added.
But the SCORE at the top of the screen says 5000, when it should be 0 ofcourse! The score monitors the actors Y position and bases it on that as it goes up. So how would i fix this and make the score start at 0 and then go up from there as the acotr goes up?
I have an actor a little way up the screen which is on a timer which makes it fly down. It is supposed to start on 0 points, because as the player "taps" it the atctor goes up and points are added.
But the SCORE at the top of the screen says 5000, when it should be 0 ofcourse! The score monitors the actors Y position and bases it on that as it goes up. So how would i fix this and make the score start at 0 and then go up from there as the acotr goes up?
Comments
Rule
if self.motion > 0
If game.mainscore is greater or equal to self.position.y
save attribute game.mainscore key SCORE
Rule
If game.moving is fasle
if self.position.y > game.mainscore
then
timer
every 0 seconds
change attribute game.mainscore to self.position.y
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
The thing that happens now though is, it starts at 0, when actor goes above it goes up. But if the player misses the actor, the actor flys down, and the score goes into the minuses. I want it to remember where the player got up to, you know? Any ideas?
if self.position.y-5000 > game.mainscore
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
TIMER
every ? secs
RULE
if livescore>actual score
livescore = livescore + (certain factor)
actual score = livescore.
otherwise
actual score = livescore.
you might test this one out coz im not really sure if this will work i type this on PC while im on my day Job. lolz.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I put self.position.y-5000 in the expression editor. But as you said try switching them around. But I cant type -5000 in the first box of change attribute.
If I click on it to type, or double click, it comes up with the attribute browser.
Rule
if self.motion > 0
If game.mainscore is greater or equal to self.position.y
save attribute game.mainscore key SCORE
Rule
If game.moving is fasle
if self.position.y > game.mainscore <--- I am trying to put -5000 after self.position.y but it wont let me.
Rule
if self.motion > 0
If game.mainscore is greater or equal to self.position.y-5000 <--- I put it here, this way it remembers their top
score and shows it on the end game screen. save attribute game.mainscore key SCORE
When they are playing the game though it still goes into the minuses.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Can you explain why that worked? It was the Real attribute that did it?
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps