Hi Novice and all,
Well I tried out around a bit. But it didn't work /wasn't the solution. It's my fault. My description of what I need was too general. So here's exactly what I would like to do:
We are still in the game I am working on, with the rider in the desert:
In fact, the whole thing is the quest of the hero to get trough a lot of different challenges to free the sleeping beauty princess. (pretty classic, but I have a modern version in mind)
Anyway. You can't get to goal if you don't reach a certain final score. You don't even go to the next adventure, (level) when you fail the previous one. The first challenge is the ride trough the desert of the flying monsters. You must help the hero to get trough by shooting the flying demons with mouse clicking in them (pretty tricky, those little bastards are fast) When you shot one, you increase the score. But if a monster hits the rider (collision) it decreases the score.
I want the actual score being visible on the screen.
For nowI worked with the score as a text actor and with
- Code: Select all
score.textNumber = score.textNumber + 20;
To increase the score when a monster is killed and with
- Code: Select all
score.textNumber = score.textNumber - 20;
When a monster hits the hero.
So far so good. I plan to create a timer with the beginning of the desert ride for, let's say 2 or 3 minutes. When time is over, it is decided wether you were sucessful or not. If a minimum of score is not reached (let's say 400) an actor is created that creates a "game over" panel. "Sorry, try again".
If you have 400 or more score, the actor creates the next challenge. The ride trough the ghost swamp.
So the thing for me is now how to make it that the "end of chanllenge, now let's decide which way to go"-actor can use he score number to decide which actor will be created; The game over panel or the next level originator.