PDA

View Full Version : Help with Billboard at end of Game


jeisenhart
05-06-2014, 08:15 PM
I made a simple swimming game where you collect coins and avoid sharks. At the end of the program Iíd like to display either the Game Over or Win Screen. I made the menu using a Billboard. I have it so when the lives hit 0 the billboard is showing gets set to true. When I run it, it changes to true in the properties but does not actually show up on screen for some reason. In other words itís saying its showing but it really isnít. Iíve tried everything. Any quick help?

MrMoke
05-06-2014, 10:06 PM
Are you sure the camera is pointing at the billboard? If the billboard isn't in front of the camera, you won't see it.

jrrTolkien
05-06-2014, 10:16 PM
And make sure that the opacity is set at 100%. If it's 0%, the thing won't show, despite it's showing value. It might also just be a little behind the camera. If there was a point where you culd see it, hit undo a few times to see what you changed that may have triggered the problem.

-Jrr

jrrTolkien
05-06-2014, 10:17 PM
If you put your code up, we can review it and try to find out what's wrong.

jeisenhart
05-07-2014, 05:47 PM
It wonít let me attach any files for some reason.
I have 2 billboards as Menus that currently work.
I have the main screen and an instruction screen that work fine when I run the program. Iíve also put the screen Iím having trouble with in front of the main menu that is working. When I change the isShowing value to true in the properties window before I run the game, the game over screen does appear. However, when itís called and it doesnít work.

I have a ďWhen variable changes eventĒ that calls a method. When the Lives variable change, it calls the ďisGameOverĒ method which has an IF/Else statements that checks if the Lives variable == 0. I know this works because instead of the screen popping up Iíve had the diver instead say game over and that works. I also put the change isShowing to true line of code above the ďmake diver sayĒ line of code. Since the diver does say Game over it has to be going over that line of code and changing the value. Also when I run the program and look over at the properties window, when the lives hits 0; The isShowing property does change to true however it just doesnít pop up.

Thanks for the help guys. Iíll keep checking to see if it lets me attach it

jrrTolkien
05-07-2014, 05:51 PM
We'll do what we can, but it's kind of hard to know what's wrong without seeing it. What happens when you try to attach things?

-Jrr

jeisenhart
05-07-2014, 05:54 PM
I click on the upload button but nothing happens. Iím gonna try a different browser

jrrTolkien
05-07-2014, 05:54 PM
Try putting the opacity to 100% and the isShowing to true and see if you can get it to show up even while the program isn't running. That way, you can move the camera. Also try using the camera get a good look at this. Then you can know if Alice recognizes if it's there or not.

jrrTolkien
05-07-2014, 05:56 PM
It sometimes takes a while to upload. How large is the file in question? It might just take longer than you want to wait, no offense.

-Jrr

jeisenhart
05-07-2014, 05:59 PM
Well that's the thing, the opacity is set to 100% its just the isShowing thats set to false. So I did the same thing, I turned the value to true before running it and it showed up. This game involves moving in a straight path and only moving up or down so I have everything oriented perfectly.

Used Firefox and it let me upload it

jrrTolkien
05-07-2014, 06:02 PM
Great, just a moment. I need to review it.

-Jrr

jeisenhart
05-07-2014, 06:02 PM
Also I just realized the one I attached has the isShowing thing to change in the StartGame method. That wasnít there before I was just testing stuff out. Delete that line in the do together

jrrTolkien
05-07-2014, 06:19 PM
This is a well-written program, but I found the bug!! Set the menu's vehicle to the camera. The camera was moving, but it left the menu behind!

-Jrr

jeisenhart
05-07-2014, 06:20 PM
Thanks so much man!! That is such a easy fix, no wonder!!

jrrTolkien
05-07-2014, 06:22 PM
I found it by setting the value to true and running it while the opacity was at 40%. It showed the camera take off without the menu ;) On second thought, to make it playable the second time, you should put everything in the "Menus" folder to have the camera vehicle. Tell me if you have any other difficulties!

-Jrr

jrrTolkien
05-07-2014, 06:33 PM
Side-note, the diver can still move up and down after you win. You may want to adjust this. Also, if you kill the sharks, it gives you a point, but it still plays the coin sound. You may want to put a different sound effect for that event.

-Jrr

jeisenhart
05-07-2014, 07:15 PM
Yeah once the game is over now both the win screen and the game over screen work, so they wonít see him move up or down. The game will just be over.

As for the score sound, I had the play sound in the addScore method and I couldnít think of any sounds so I figured anytime a score is added it can just play that sound. If I find a better sound Iíll move that around.
Thanks man.

The only issue Iím having now is how to end the game if he doesnít score the 15 or lose all of his lives. Iíve tried a few things but none have worked. I need the game to stop basically after he passes the last coin if he doesnít have all 15 points or hasnít lost his lives

jrrTolkien
05-08-2014, 08:50 AM
You could use some sort of if distance behind method for the coin that also checks for the score. Or you could have a method that is activated after you click play that waits for the amount of time it takes to get over there, then checks if the score is 15. If if isn't, the game just stops.

-Jrr