PDA

View Full Version : Help with Game


Petit Suisse
08-07-2015, 01:38 PM
Hi All,

Working on my game project for class, and I'm experiencing a small snag. The game is a maze where a fairy has to pick up flowers within a certain time period. I haven't added the timer yet and still have to adjust some of the cameras.

To test it i suggest fast forwarding to the very end, as some of the stuff before isn't complete.

You can move the fairy with the arrow keys. When the fairy is within 1m of a flower it adds to the counter, and the flower moves down 2m. This way you can't pick up the same flower twice. The number goes down if you are within 1m of a cactus.

Strangely when I run this after I pick up 2 flowers it won't go further. If I decrease with a cactus, I can go up again. Somewhere in there i'm limited to counting to 2.

Can anyone see what might be causing this?

Thanks.

Petit Suisse
08-08-2015, 10:31 AM
The last issue I has, was that I had forgotten to add all items to my list. That is solved.

However now, I would like my fairy to return back to the starting position after the timer runs out, but nothing happens.

Can someone lend some insight please?

CodeMan
08-08-2015, 12:57 PM
The last issue I has, was that I had forgotten to add all items to my list. That is solved.

However now, I would like my fairy to return back to the starting position after the timer runs out, but nothing happens.

Can someone lend some insight please?

So you made 2 mistakes, fortunately both are simple fixes:

1. In your TimerMethod need to take out the if else statement with your reset code in it and put it in a different method/event that constantly checks (like while world is running or something).

2. In the 'when mouse is clicked on instuctions' event you need to put a doInOrder in there with gameOn setting to true before you do world timerMethod.

Hope this helps if not I can give more detail, and if you have any other questions feel free to ask as its not a bother to me (it took me about 2 mins to fix :p).

Good luck with your project!