Help, my moles are barely visible when plopping up. Spent a long time trying to figure out what's wrong but I just can't manage to understand what's wrong.
@RuthlessMetalYT
5 ай бұрын
I figured it out, I didn't put -1 on the Y axis on the hole. I'm a dummy. haha
@FirnoxGames
5 ай бұрын
Glad you managed to figure it out on your own!
@RuthlessMetalYT
5 ай бұрын
@@FirnoxGames yeah it took some time. Unity is time consuming. thanks for the video!
@SHANGWEN-p8s
Ай бұрын
Hi, your teaching is very practical! I learned how to create this game from the basics, but how do I modify the game if I want it to only have normal mole?
@RuthlessMetalYT
5 ай бұрын
when the game isn't running the moles look fine but when I start the game they are hardly visible in the hole. How do I change that and put them higher up?
@RuthlessMetalYT
5 ай бұрын
The moles needs to be higher up upon plopping out of the hole. How do I change that?
@tinylaly
2 жыл бұрын
Thanks this is really good
@Proseph323
Жыл бұрын
This tutorial is amazing, just can't get my moles to respawn or my play button to function. I'm sure I messed up somewhere along the way.
@camileytor3000
Жыл бұрын
I'm having the exact same issue
@FirnoxGames
Жыл бұрын
For the play button, the only thing I can think is that missed the assignment of the function to the onclick event at point 17:35 in the video?
@ievarituma1918
Жыл бұрын
Nice tutorial, ty
@anete776
Жыл бұрын
Amazing content!
@RuthlessMetalYT
5 ай бұрын
How do I add different types of moles?
@ArunavaDutta-v8k
Ай бұрын
can i get the full unity project folder pls
@shortvideos8177
2 жыл бұрын
In your previous tutorial I got confused whenever you remove the reshuffling method the game misbehaves
@FirnoxGames
2 жыл бұрын
I'm sorry I don't understand your issue. On the SlidingPuzzle game, how are you removing the reshuffling method. If you just comment out the StartCoroutine(WaitShuffle(0.5f)); on line 61. Then the game will allow you to click on pieces, and it should still work. It just wouldn't do anything when you finish the game.
@shortvideos8177
2 жыл бұрын
@@FirnoxGames hello after doing that the game does not shuffle on start
@shortvideos8177
2 жыл бұрын
@@FirnoxGames hello i commented that out on. Start the game does not shuffle
@camileytor3000
Жыл бұрын
This is a great tutorial! however I've found a bug, I'm not quite certain what could've caused it but the moles son't come back up after they've gone down the first time around
@FirnoxGames
Жыл бұрын
The moles once triggered go up and down once only, then they need to be triggered again. In the GameManager this is done in the Update() method where if we've got space on the board we trigger another mole by calling the Activate function: moles[index].Activate(score / 10); If you have this then the only thing I can think of is that you didn't assign the GameManager to each of the mole objects. Without that when the animation finishes they need to tell the GameManager you missed them, so if that assignment is missing it wouldn't work - though that should give you an error.
@dany3310
Жыл бұрын
Yes, I have the same problem here.
@HuyQuangNguyen-x7f
11 ай бұрын
Thanks for the tutorial. I don't know how the bug is caused but the moles stop spawning after a while.
@ArunavaDutta-v8k
Ай бұрын
can you give me the full project plss
@Lucas-ed6dv
Жыл бұрын
Very clear tutorial, so thank you very much in advance. However, im a beginner at Unity and i want to create a project using this code. Would It be possible to "hit" the moles by pressing buttons on the keyboard? So instead of using the mouse. Kind regards!
@FirnoxGames
Жыл бұрын
Yes absolutely that would be possible. First thing in your Mole.cs script change the OnMouseDown() function to public so you can call it from the GameManager. Then in the GameManager in the Update method you can check for your key presses and map them to the moles. I added the moles in a strange order to the array so center=0, topmiddle=1 bottommiddle=2. But once you have the mapping you can just do a big if else loop to sort it out: if (Input.GetKeyDown(KeyCode.Keypad5)) { moles[0].OnMouseDown(); } else if (Input.GetKeyDown(KeyCode.Keypad8)) { moles[1].OnMouseDown(); } else if (Input.GetKeyDown(KeyCode.Keypad2)) { moles[2].OnMouseDown(); }...
@madeleineyeung5902
Жыл бұрын
This was a great tutorial! However, I'm having a little bit of trouble. I finished adding in all the GameManager logic, but my game's play button does not work. Nothing happens after I click my "Play Game!" button. Additionally, my moles do not pop up and down after I hit the play button in Unity, as they simply remain static. The only thing that seems to be working is when I click each mole, they change to the HitMole sprite and disappear from the screen completely. I am a beginner at code/Unity so I fear I may have messed up somewhere...
@FirnoxGames
Жыл бұрын
Sorry that you've been having issues, it's probably the case that you're just missing a link tying together the objects and the game manager but it's hard for me to make suggestions without seeing your code. You can download the full project from the video here: github.com/Firnox/Whack-A-Mole/archive/refs/heads/main.zip
@madeleineyeung5902
Жыл бұрын
@@FirnoxGames Do you happen to have the file with the game already set up? I downloaded the zip file with all of the assets, but nothing was set up in the Unity Scene. I think my issue lies with how I connected things in the Inspector, but I'm not sure where I messed up.
@FirnoxGames
Жыл бұрын
@@madeleineyeung5902 Sorry for the delay in replying. I'm sorry for the confusion, the scene is there setup everything in it however when you download and open the project it just shows you a new scene. If you go to the Scenes folder and double click on the "Sample Scene" it'll load up the one I did in the video with everything linked and should just work for you.
@madeleineyeung5902
Жыл бұрын
@@FirnoxGames Ahh I see, I didn't realize! Once again, I'm a complete beginner. I see it now. Thank you so much! :)
@tmjaye5536
Жыл бұрын
Hi, I have completed the tutorial (which is great Thank You) and would like to put sound to the moles and another to the bombs when you click on them. As I am a beginner, I have no idea where I should put the reference, would I place it in the Game Manager script, or would I need to add a new script altogether. Thank you again for the tutorial, it has been very helpful 🙂
@FirnoxGames
Жыл бұрын
Firstly, you want to add a "Audio Source" component (which you can put on your GameManager). The in the GameManager you'll need a reference to this: `public AudioSource audioSource;`, you'll also want to add a couple of audio clips to represent your sounds: `public AudioClip moleSound; public AudioClip bombSound`. Then when you handle the mole click with the "AddScore" function you can put in the playing of the sound there `audioSource.PlayOneShot(moleSound)`. Clicking on the bomb is handled in "GameOver" so on the line before setting the bomb text you can put the other `audioSource.PlayOneShot(bombSound)`. Hope that helps!
@tmjaye5536
Жыл бұрын
@@FirnoxGames OMG Thank You 🥳 I have been stuck on that for days, I was kind of close, but also waaaay off 🙃 Every time I tried something, I kept messing everything else up. Thank you so much again for all your help, it is very much appreciated.
@hadyanihtifazhuddin3476
Жыл бұрын
thanksss for the content
@skyfeedy
Жыл бұрын
Thanks for the lesson! But I have had difficulties since 11:05 - my mole does not appear after it goes into the hole. What should I do in this situation?
@FirnoxGames
Жыл бұрын
Skyfeed, sorry for the confusion. I think at this point in the video the code is such that it comes up and down once. We call the ShowHide Coroutine in the start method. After the model has finished hiding it won't come up again until it gets called again. As we go through and implement the game logic we call the method repeatedly to keep the right number of moles visible, at around 12:38 I convert the Start function to an Activate function so we can repeatedly call it. I missed out explaining that I'd looped the animation, to be able to show you the need to shrink the collider. I think if you carry on with the video you should be fine. Sorry!
@skyfeedy
Жыл бұрын
@@FirnoxGames I converted the "Start" function to the "Activate" function, but in the end even the animation stopped working. After converting to Activate, I can click on the moles and they disappear, but there is no animation of their appearance What did I do wrong again?
@FirnoxGames
Жыл бұрын
@@skyfeedy Sorry it's hard to know what you have and haven't done. The GameManager is the bit that calls the Activate function, the full code is available on GitHub: github.com/Firnox/Whack-a-mole so you could just copy/paste the code for the Mole and GameManager in there into your project and see if that fixes things. If not then there is possibly something missing from the Unity Inspector end. You can just download the full project as a zip file and load it up in Unity then you could compare to see where the issue is, or just start from the finished product if you'd rather.
@mudassarkhan6153
10 ай бұрын
How can I implement Touch Screen Input in this game please help.
@FirnoxGames
10 ай бұрын
As it was implemented using the mouse events this should work for single touches, because in Unity the first touch acts just like a mouse click. However, it will not work for multiple touch events working at once then you'll have to look into the touch options: docs.unity3d.com/ScriptReference/Input.GetTouch.html
@gytiskirkliauskas2482
Жыл бұрын
I dont know why but my sprite mask always becomes a circle
@FirnoxGames
Жыл бұрын
On the SpriteMask component I use a 1x1 white pixel as the sprite and set the scale to 256x256 to give the right sized square sprite mask. Have you perhaps used some other sprite in here (such as the Knob which is circular)?
@Vinn237
Жыл бұрын
Im Confusing Broo
@FirnoxGames
Жыл бұрын
I've got the project linked in the video description which you can download from GitHub if looking at the full finished thing will help you out!
Пікірлер: 47