Scoring points for spawning an actor on the right spot
My game spawns a (button) actor at the spot where the mouse pointer is clicked. If the player has selected the correct XY position on the screen then the score increases by 1. If however, the player gets another position right with the next guess, he gets a bonus score of 500 points.
My questions are: How do I match up the spawned actor with the secret spot on the screen?....and How do I achieve the bonus score aspect?
Many thanks
My questions are: How do I match up the spawned actor with the secret spot on the screen?....and How do I achieve the bonus score aspect?
Many thanks
Comments
The easiest way would be to have a rule the says if button overlaps with secret spot (tee he he)
change game.score to game.score + 100
change game.foundsecretspot (tee he he) to 1
When game.foundsecretspot is 1
spawn actor imageOfYouFoundThe SecretSpot (or something that tells player they found it)
or you could check the distance between the xy of the secret spot and the xy of the button using magnitude