Score based on movement upwards
Theodi
Member Posts: 96
Hi everyone, I need some advice on setting up a system for scoring, based on an actors movement upwards, like in papi jump the score goes up as he gets higher. I have tried the following already, but it doesnt work for some reason,
If self.position.x is less than game.heightscore
then
change game.heightscore to self.position.x
I have an actor displaying the game attribute game.heightscore but it stays at 0 and doesn't go up, unless I collect bonus items along the way but thats different.
Any help would be great to resolve this!
If self.position.x is less than game.heightscore
then
change game.heightscore to self.position.x
I have an actor displaying the game attribute game.heightscore but it stays at 0 and doesn't go up, unless I collect bonus items along the way but thats different.
Any help would be great to resolve this!
Comments
If up is pressed
If touch is pressed
If jump is True with a boolean attribute
Actor 1
Display text - Game.highscore
Actor2 - Your moving actor
Create rule
IF attribute self.motion.linearY is > then 0
Change attribute game.highscore TO self.motion.linearY*10 (or what ever you want)
It displayed the score 3525 and 3200, it kept switching between the 2 as I tapped the actor. The actor is on a scrollable layer which goes up, which the size is 75000 so a long way up.
It is displaying something at least, but not quite working 100% yet, any ideas why?
The actor is tapped as he comes flying down, then he just keeps bouncing upwards without me tapping him? Like there is an invisible floor, but there isnt.
Ill take a Quick look
Create a boolean called moving
on your moving actor:
Create Rule
IF attribute Game.moving is false
Timer
Every 0 sec
Within the timer rule Change attribute Game.highscore TO self.position.Y
That should do it... hope it helps
Do you know why the actor is bouncing upwards on its own without me clicking it now? I haven't changed anything apart from the score you gave me.
How would I set it up to remember the height they got to?