Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Questions and Comments (http://www.alice.org/community/forumdisplay.php?f=9)
-   -   Help with Game (http://www.alice.org/community/showthread.php?t=11262)

Petit Suisse 08-07-2015 12:38 PM

Help with Game
 
1 Attachment(s)
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 09:31 AM

Different issue
 
1 Attachment(s)
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 11:57 AM

[QUOTE=Petit Suisse;56688]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?[/QUOTE]

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!


All times are GMT -5. The time now is 03:47 PM.

Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.