Updates to my Skybox Portal Reign Game

argon-assault

#42

What do you think the OnTriggerEnter method is doing in your above example then?


#43

For what I believe it should trigger the sound when I fire. correct? I could be missing the fire input statement yes?


#44

No. Its the method which is called when whatever GameObject has the script attached, and a collider, and there is a collision between this and another GameObject (I’m deliberately leaving out some specifics here) - it doesn’t have anything to do with the player input.

Have you completed the Project Boost section?


See also;


#45

I got the script attached to the gameobject called lasersound is that correct?


#46

Have you completed the Project Boost section of this course Martin?


#47

I look over the lessons again. I will get back to you if its okay.


#48

The reason I ask Martin, is, as above, this was all covered in that section - both the player input (space bar) and the emission of particles and the playing of audio.

It is also a bit concerning that you weren’t aware of what the OnTriggerEnter method was doing, this has again been covered in this course already so you may find it beneficial to revisit some sections and ensure you are familiar with the concepts which are explained. You may see OnCollisionEnter in the course, its effectively the same, the collider just isn’t a trigger collider.

With regards to questions like this;

“I got the script attached to the gameobject called lasersound is that correct?”

That is just far to ambiguous. How can anyone answer that when they cannot see the context of your question, they don’t have the project, they don’t know what your LaserSound GameObject is, or what it’s attached to, or whatever else may affect it in the scene. The problem with questions like this is that they then require many more questions from those that offer to help in order to try and establish the context. The responses that are given are not always overly helpful which then requires further digging until eventually, if you’re lucky, you get something useful.

To give you an example, if I say this, “I’ve just opened Unity, do I need to attach my LightFlicker.cs script to the Light GameObject in the scene?” - how would you know how to answer that? Would you say yes? Would you say no? It sounds like it might be a good idea to add it to the Light GameObject, but only because the script suggests its to do with lighting. What if the LightFlicker.cs script was actually meant for a candle and not a light.

Hopefully you can see what I’m getting at here.

Also - when we spoke a few weeks back, you were going to invest some time looking at Git, so that you could more easily share your projects when asking questions - how’s that come along?


#49

I hope I didn’t offend you Thank you anyway.


#50

No, not at all, and likewise. It’s not that I am not trying to help you, quite the opposite, by reviewing what you’ve already done you should be able to work out how to a) make something happen based on player input (note, you are already capturing player input elsewhere in your game already) b) emit particles only when there is play input c) in a very similar way, make particles emit when there is player input

If however we embark on a lengthy journey of me having to ask you lots of questions to try and establish the context, what would be a fairly quick solution will take a lot longer, and unfortunately I don’t have that kind of time to spare. This is why I have suggested, many times, that you make it easier for people to help you. Downloading 3GB of project is not helpful, downloading just the changes to the last time I downloaded your project (via Git) is helpful. Hope this helps sense :slight_smile:


#51

Yeah, okay if you only new what I going through with got Rob but no worries I figure it out somehow git is not as easy for me as it is for other believe I’m trying to grasp the concept of git and committing new project but it doesn’t do work for me when I
try practicing using it. Its all good when I have more time on my hand I will make it work. Thanks


#52

This is why I suggested starting with a very simple throw-away project for practising Git. It doesn’t even have to be anything to do with Unity initially, you could just be putting text files into a folder and changing their content. Become fluent with the process of creating a repository, making changes to the file(s), commit changes to a local repository, pushing changes to a remote repository - all of those steps are not massively challenging, especially if you use a GUI client rather than trying to perform the tasks via the console. There are many videos on the subject, I believe I’ve linked you to resources previously.

The above is not only beneficial for sharing your project, but hugely beneficial for you being able to roll back if you need to at any point and having secure, reliable backups effectively of your larger project(s).


#53

We will chat later if you can because that’s exactly what I tried to do I can explain more later I’m in a meeting I apologize.


#54

Hi, Rob I going to create a video of my experience using Git then maybe you can tell me where I went wrong. I will post it in a bit.


#55

Hi Martin,

Answering your specific question, you would create a remote repository, on GitHub for example, then push your local repository to the remote repository. You would then share the URL to the remote repository.

When you make your changes and commit them you would be doing this locally, so at specific points you would then push again to the remote repository so that others could clone a copy.

As an example of this process, the first time you do this I would need to clone the entire. Remote repository to a local repository on my own computer, so no big saving on time, however, assuming I don’t delete that local copy, whenever you push changes to your remote repository I (or anyone else) would only need to pull the changes, so just a few files, not the entire 3GB of project.

Note, you’ll also want to make sure you are using a suitable .gitignore file for your local repository or else you will be committing lots of additional files that are unnecessary. This includes, but is not limited to, the library and .vs folders along with a variety of files types that are not needed in your repository.

Be aware that GitHub has a limit of 100MB max file size (per file), so if you have larger assets you’ll needed to either streamline your project, e.g don’t have them in the working project files if they are not needed, or, use LFS with GitHub in order to support the large files you do need.

Regarding GitKraken, as I have mentioned before, this is a GUI client, it is a tool that makes using Git easier for you, rather than having to type commands into the console, it doesn’t magically share files, you still need to xrwate the remote repository and push your files.

Side note, if you havent already, I wpuld highly recommend you read up on branching, this is very useful when you plan to make a significant change, you can effectively work on a separate copy of your project locally, called a branch, if it goes well and as expect you can then merge those changes back into the main branch in your repository, if it doesn’t or you decide to not proceed with the feature you can then just delete the branch and your main branch version remains unchanged/intact.

Hope this helps :slight_smile:


#56

Rob, Thank you, I will work on following these steps here is what I need help with Bu I will read on it: for some reason, I get a message in GitHub stating file exceeds 25Mbs you state I’m allowed 100Mbs why do I get this message when I try uploading the file as a zip?

Note, you’ll also want to make sure you are using a suitable .gitignore file for your local repository or else you will be committing lots of additional files that are unnecessary. This includes, but is not limited to, the library and .vs folders along with a variety of files types that are not needed in your repository.

Be aware that GitHub has a limit of 100MB max file size (per file), so if you have larger assets you’ll need to either streamline your project, e.g don’t have them in the working project files if they are not needed, or, use LFS with GitHub in order to support the large files you do need.


#57

I found GitHub for desktop I was using the online version that is why my files would not upload. :frowning:


#58

Hi, Rob, I was able to upload to GitHub How do I get the URL to share the project Portal_Reign_LaserSound_Sample with you?


#59

Hi Rob, I hope you can see my project now please let me know if this URL is working


#60

Hi Martin,

Looks like you’ve answered a lot of your own questions above. Regarding the URL, yes, I can see your project.

I note you’ve called your repository _Portal_Reign_LaserSound_Sample, is this the name of your project going forward, or is this just a one off copy for this specific issue?


#61

It is a copy of this specific issue. I would like to correct this and the fact that the guns shoot automatically when start up once these two issues are fixed I want to add new sound to enemy explosion. I know how to add the new sound to enemy explosion is the other two issues Ix need guidance with.