Jump to content

I have a few questions about unity

1. Is it too much for a 13 yr old?

2. Can I get a code for moving with everything explained step by step

3. If I want to make a model should I do It in blender or something else

4. How do you even make code for wall walking, crouching etc.

5. How do you make your own graphics

 6. Maybe some other help?

 

 

Link to comment
https://linustechtips.com/topic/1159121-unity-help/
Share on other sites

Link to post
Share on other sites

You're gonna wanna start learning how to program. Don't expect much out of it for a long while.

 

The things you're asking for are fairly advanced, take everything step by step

Community Standards || Tech News Posting Guidelines

---======================================================================---

CPU: R5 9600X || GPU: RX 9070 XT|| Memory: 32GB || Cooler: Peerless Assassin || PSU: RM850e|| Case: Lian Li A3

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13324367
Share on other sites

Link to post
Share on other sites

2 minutes ago, Budget gamerXD said:

1. Is it too much for a 13 yr old?

It doesn't have to be, if you start out simple.

2 minutes ago, Budget gamerXD said:

2. Can I get a code for moving with everything explained step by step

[...]

4. How do you even make code for wall walking, crouching etc.

Starting simple means either:

a. you start with basic scripts available online

or

b. start learning how to code.

 

Start off with some simple tutorials online, start by messing around in the program. You don't start running before learning to walk.

3 minutes ago, Budget gamerXD said:

3. If I want to make a model should I do It in blender or something else

Usually you use a combination of Blender for 3D models and an image editor (Gimp, Krita, Photoshop) for textures.

But start slowly. Maybe start with a simple 2D game, so you don't burn yourself out in a month on all this stuff.

4 minutes ago, Budget gamerXD said:

5. How do you make your own graphics

Simple put, you just make it.

That can be done in many programs.

5 minutes ago, Budget gamerXD said:

 6. Maybe some other help?

Get yourself a good tutorial series online and start coding. Take it slowly and if something doesn't work, you can ask on the forum.

This guy has got some really good beginner tutorials:

https://www.youtube.com/channel/UC9Z1XWw1kmnvOOFsj6Bzy2g

 

This is a good series:

But  you should probably follow a couple of his series to get yourself familiar with the program

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13324378
Share on other sites

Link to post
Share on other sites

6 minutes ago, minibois said:

It doesn't have to be, if you start out simple.

Starting simple means either:

a. you start with basic scripts available online

or

b. start learning how to code.

 

Start off with some simple tutorials online, start by messing around in the program. You don't start running before learning to walk.

Usually you use a combination of Blender for 3D models and an image editor (Gimp, Krita, Photoshop) for textures.

But start slowly. Maybe start with a simple 2D game, so you don't burn yourself out in a month on all this stuff.

Simple put, you just make it.

That can be done in many programs.

Get yourself a good tutorial series online and start coding. Take it slowly and if something doesn't work, you can ask on the forum.

This guy has got some really good beginner tutorials:

https://www.youtube.com/channel/UC9Z1XWw1kmnvOOFsj6Bzy2g

 

This is a good series:

But  you should probably follow a couple of his series to get yourself familiar with the program

Ok so I should start the simplest code like writeline thing

Also what is a syntax?

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13324414
Share on other sites

Link to post
Share on other sites

Just now, Budget gamerXD said:

Ok so I should start the simplest code like writeline thing

Also what is a syntax?

Start out super simple. Start out with making your game pickup keyboard input and spitting out a Console.WriteLine. Then try to make a square and make that move around with your input.. Move along from that.

2 minutes ago, Budget gamerXD said:

Also what is a syntax?

See syntax as grammar for code. The rules of how you write code.

Just like in English you start your sentence with a capital letter and end it with some form of punctuation (like a dot, exclamation point, etc.), code has some rules as well.

 

In Unity you will be working with C#. This uses syntax that most other languages use as well.

There is no set way to begin a sentence in C#, but you end a sentence with a semicolon (;). I think that is the most important thing to keep in mind, before I start to ramble off and show the ins and out of C#.

 

Most of your first scripts will look a little like this:

// < These two slashes mean this is a comment. Not actual code.
// These comments are used to clarify what pieces of code do.

// This is for importing some instructions you will be using.
using UnityEngine;

// This 'ExampleClass' is the name of your class and should be the same name as the file.
public class ExampleClass : MonoBehaviour
{
	// Here is where you will make your global variables. More on those later.
    public int Health;
	
    // Starts runs 1 time at the beginning of this script's existence. So for example when you player spawns.
    void Start()
    {
    	// Set the default/starting value of global variables here.
        Health = 100;
    }
    
    // Update is run once every frame. You use this for game logic, like walking, getting hit, etc.
    void Update()
    {
    	// This is an if-statement. As the name suggests, you use this to check something.
      	if(GetHit == true)
        {
          	Health = Health - 1;
        }
      
      	// This is how to run a function. What is inbetween () is called a 'parameter'. It's a value you can pass along to a function.
      	CheckIfPlayerIsAlive(Health);
    }
  
  	// This is a new function, that will do something.
  	// 'private' means only this class can see it. 'void' means it will not give something back
  	private void CheckIfPlayerIsAlive(int health)
    {
      	// here I check if the health is smaller than or equal to 0.
      	if(health <= 0)
        {
         	// If so, the player is dead.
          	// Here I call the 'imaginary' EndGame() functions. See how I now don't give a parameter.
          	EndGame();
        }
      	
    }
}

I just made a little script to introduce you to some of the syntax of C#.

What is probably important to know if some of the primary variable types:

// String is a text variable.
string exampleString = "Some text here";

// Int is a whole number. No decimals.
// Good for health, level, etc.
int exampleInt = 5;

// Float is a number WITH decimals.
// Good for precise numbers, like rotation
float exampleFloat = 5.0f

// Bool is either true OR false.
// Good to check true/false things. Like does a player have certain rights or something?
bool boolExample = true;

Knowing these four (text = string - number = int if you don't need decimals, otherwise float - bool = true or false) you know quite a bit already to get yourself started in tutorials.

 

If you anything is unclear, I would be happy to help!

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13324496
Share on other sites

Link to post
Share on other sites

13 minutes ago, minibois said:

Start out super simple. Start out with making your game pickup keyboard input and spitting out a Console.WriteLine. Then try to make a square and make that move around with your input.. Move along from that.

See syntax as grammar for code. The rules of how you write code.

Just like in English you start your sentence with a capital letter and end it with some form of punctuation (like a dot, exclamation point, etc.), code has some rules as well.

 

In Unity you will be working with C#. This uses syntax that most other languages use as well.

There is no set way to begin a sentence in C#, but you end a sentence with a semicolon (;). I think that is the most important thing to keep in mind, before I start to ramble off and show the ins and out of C#.

 

Most of your first scripts will look a little like this:


// < These two slashes mean this is a comment. Not actual code.
// These comments are used to clarify what pieces of code do.

// This is for importing some instructions you will be using.
using UnityEngine;

// This 'ExampleClass' is the name of your class and should be the same name as the file.
public class ExampleClass : MonoBehaviour
{
	// Here is where you will make your global variables. More on those later.
    public int Health;
	
    // Starts runs 1 time at the beginning of this script's existence. So for example when you player spawns.
    void Start()
    {
    	// Set the default/starting value of global variables here.
        Health = 100;
    }
    
    // Update is run once every frame. You use this for game logic, like walking, getting hit, etc.
    void Update()
    {
    	// This is an if-statement. As the name suggests, you use this to check something.
      	if(GetHit == true)
        {
          	Health = Health - 1;
        }
      
      	// This is how to run a function. What is inbetween () is called a 'parameter'. It's a value you can pass along to a function.
      	CheckIfPlayerIsAlive(Health);
    }
  
  	// This is a new function, that will do something.
  	// 'private' means only this class can see it. 'void' means it will not give something back
  	private void CheckIfPlayerIsAlive(int health)
    {
      	// here I check if the health is smaller than or equal to 0.
      	if(health <= 0)
        {
         	// If so, the player is dead.
          	// Here I call the 'imaginary' EndGame() functions. See how I now don't give a parameter.
          	EndGame();
        }
      	
    }
}

I just made a little script to introduce you to some of the syntax of C#.

What is probably important to know if some of the primary variable types:


// String is a text variable.
string exampleString = "Some text here";

// Int is a whole number. No decimals.
// Good for health, level, etc.
int exampleInt = 5;

// Float is a number WITH decimals.
// Good for precise numbers, like rotation
float exampleFloat = 5.0f

// Bool is either true OR false.
// Good to check true/false things. Like does a player have certain rights or something?
bool boolExample = true;

Knowing these four (text = string - number = int if you don't need decimals, otherwise float - bool = true or false) you know quite a bit already to get yourself started in tutorials.

 

If you anything is unclear, I would be happy to help!

Mate thank you so much.

This is enough help, I will try to figure out the rest but if I need help I will ask you, thanks again!

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13324554
Share on other sites

Link to post
Share on other sites

@miniboishey it's me already XD

So if I want my player to move it should something like this

Using UnityEngine

{

         Public class "something" : MonoBehavior

               Void start

                      Float MouseX

                                 ...

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13324587
Share on other sites

Link to post
Share on other sites

2 minutes ago, Budget gamerXD said:

@miniboishey it's me already XD

So if I want my player to move it should something like this

Using UnityEngine

{

         Public class "something" : MonoBehavior

               Void start

                      Float MouseX

                                 ...

You don't have to write the "Using UnityEngine" etc. etc. stuff.

Just go to Unity, right click in the explorer New Script > Give it a name > Open and something like this should show up:

using UnityEngine;

public class YourClassNameGoesHere : MonoBehaviour
{
	void Start()
    {
    	// Runs once at the start
    }
    
    void Update()
    {
    	// Runs once every frame
    }
}

 

Then you can add/remove whatever you see fit.

You declare your variables you need in the entire class just above start. You initialize (give them their first value) in Start and then you start coding away.

There are a million ways you can move a character around. The way I have always done it is like this:

https://docs.unity3d.com/ScriptReference/Input.GetAxis.html

Just attach the script to your object and you're done.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13324602
Share on other sites

Link to post
Share on other sites

8 minutes ago, Budget gamerXD said:

@minibois

I am 100% doing somethong wrong 

it say All complier errors have to be fixed before you can enter playmode!

What does the error say? Copy the entire error from the 'Console' portion of Unity.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13324960
Share on other sites

Link to post
Share on other sites

5 minutes ago, minibois said:

What does the error say? Copy the entire error from the 'Console' portion of Unity.

Some scripts have compilation errors which may prevent obsolete API usages to get updated. Obsolete API updating will continue automatically after these errors get fixed.
 

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13324977
Share on other sites

Link to post
Share on other sites

Just now, Budget gamerXD said:

Some scripts have compilation errors which may prevent obsolete API usages to get updated. Obsolete API updating will continue automatically after these errors get fixed.
 

That can't be the only error. It says your script(s) have additional errors.

Can you post your script's code here?

 

Be sure to use the Code tag

image.thumb.png.bcb9e2211de529ed3d47d9129a1e0cd2.png

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13324983
Share on other sites

Link to post
Share on other sites

2 minutes ago, Budget gamerXD said:

I tried again but I copied everything from your script and it doesn't work

Keep in mind the "YourClassNameGoesHere" on line 3 needs to be the name you gave the class.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13324992
Share on other sites

Link to post
Share on other sites

1 minute ago, minibois said:

Keep in mind the "YourClassNameGoesHere" on line 3 needs to be the name you gave the class.

Assets\MouseLook.cs(3,26): error CS0246: The type or namespace name 'MonoBehaviour' could not be found (are you missing a using directive or an assembly reference?)
now that

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13324998
Share on other sites

Link to post
Share on other sites

1 minute ago, Budget gamerXD said:

Assets\MouseLook.cs(3,26): error CS0246: The type or namespace name 'MonoBehaviour' could not be found (are you missing a using directive or an assembly reference?)
now that

Please paste the entire code here

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13325001
Share on other sites

Link to post
Share on other sites

1 minute ago, minibois said:

Please paste the entire code here

public class MouseLook : MonoBehaviour
{
    float horizontalSpeed = 2.0f;
    float verticalSpeed = 2.0f;

    void Update()
    {
        // Get the mouse delta. This is not in the range -1...1
        float h = horizontalSpeed * Input.GetAxis("Mouse X");
        float v = verticalSpeed * Input.GetAxis("Mouse Y");

        transform.Rotate(v, h, 0);
    }
}

I did something stupid?

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13325007
Share on other sites

Link to post
Share on other sites

Just now, Budget gamerXD said:

public class MouseLook : MonoBehaviour
{
    float horizontalSpeed = 2.0f;
    float verticalSpeed = 2.0f;

    void Update()
    {
        // Get the mouse delta. This is not in the range -1...1
        float h = horizontalSpeed * Input.GetAxis("Mouse X");
        float v = verticalSpeed * Input.GetAxis("Mouse Y");

        transform.Rotate(v, h, 0);
    }
}

I did something stupid?

You need to add this to the top of the script:

using UnityEngine;

 

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13325010
Share on other sites

Link to post
Share on other sites

On 2/25/2020 at 2:05 PM, Budget gamerXD said:

I have a few questions about unity

1. Is it too much for a 13 yr old?

2. Can I get a code for moving with everything explained step by step

3. If I want to make a model should I do It in blender or something else

4. How do you even make code for wall walking, crouching etc.

5. How do you make your own graphics

 6. Maybe some other help?

 

 

1. No if you're keen,

2. Unity's own tutorials will get you started here!

3. Do one or the other to start with, there's plenty of free models on the Unity store,

4. Don't (wall) run before you can walk. Learn the basics and make some simple games, then build up to more complex code!

5. See answer 3. Blender or 3DS Max are popular but that's a whole different skillset!

6. Unity docs are brilliant, as are the Unity forums. I've been learning for 4 years and have only launched a single semi-decent project! (Pic for reference to my work!)

Screenshot_20200205-184247.jpg

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13327820
Share on other sites

Link to post
Share on other sites

23 hours ago, Budget gamerXD said:

It still does not work ?

And I will try tomorrow

I dont want to bother anymore

Bye :D

Sounds like the file name is Mouse Look.cs remove the space and it should compile fine. You can't have spaces in your script file names!

Link to comment
https://linustechtips.com/topic/1159121-unity-help/#findComment-13327830
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×