Finally, an interactive tutorial series that WILL teach you C# for Unity3D

@ Viking,

Marvelous job!

Wolfhunter: Thank you very much for answering his question.

Video 9 will be out within the hour!

My most interactive tutorial yet! Video # 9.

If you require any sort of help, you can private message me. Please provide your script.

Thanks for watching!

P.s: We are not learning to do anything new… Attempt it. Don’t get frustrated. You can DO it!

Success it worked ! - thank you very much

What an embarrassing error to make, though I can, in my own defence and for the record, say that I had made “==” equal to, earlier but have since then I have been messing around in the code trying to figure out what to and to deal with those error messages (which are of almost no use to a newbie/noob) that this rather significant detail had been missed.

Now, my only problem is that the cube (myEnemy) won’t travel in the opposite direction once it reach the value stored in myEnemyLeft in line 28 - it seems to me that the if-statement is ignored !

Is it possible to see when each of the code lines are executed - in the editor console or in monodevelop ?

youtube is blocked in my country Pakistan proxies are slow any way i can download videos?

Having some trouble with viewing this video Jonathan… I’ll check #9 later :slight_smile:

@Viking

 if(myEnemy.position.x = myEnemyleft ){

            myEnemy.Translate(Vector3.right * myEnemySpeed * Time.deltaTime);

        }

What this is saying: if enemy position is equal to negative 9 then it should move left and right while going the speed you set while in Real Time.

what it needs to be:

if the enemy cube is at -9, then you need to change it’s position to 9.

Go ahead and try that.

@newb3e,

I’ll see what I can do about a download.

thanks man! our stupid govt has blocked youtube for months now!

and one more thing can a noob programmer follow your tutorial? I have just started learning c# and programming.

These tutorials are aimed at beginners like myself and I find them very helpful!

Just completed #9, got it right the first time around. Now, do I get a cookie?? :wink:

Very helpful as always Jonathan

thats great only if i could watch his tutorials!! :cry:

You can always try using a proxy server, try the demo on this page USA IP and follow the instructions on the left.

Maybe that way you can log on to YouTube

i have tried proxies but they are slow!

Newbie i’m in the process of zipping the videos and uploading. I’ll send you a PM with the download link.

Yvanborek,

For some reason the quality and sound of the video are awful. Did you have any problems understanding it? I just took it down. Going to re upload video 9 later this evening.

Tutorial 9 re uploaded! Better quality!

Thankyou subzero ill download videos i am going out of town for few days i wont be able to watch but ill watch them as soon as i am home!

Hi

I’m having trouble with understanding deciphring what is written in the scripting reference.

My problem is that I can’t figure out what the Random.Range is made up of !

So would any please explain what of this means ?

static function Range (min : float, max : float) : float

To me it seems like the min : float, max : float have to be float values and not integers.

What do they mean by static function ?

Why have they ended the line with : float ?

Thank you in advance

Hi Viking,

When using the Random.Range method. We use two integers. Float just means that they can be decimals.

So looking at the reference manual: http://docs.unity3d.com/Documentation/ScriptReference/Random.Range.html

We are suppose to use Random.Range(float min, float max)

In the video, I state that you need to create two variables. One for minimum speed. and one for Maximum speed. You then need to use the Random.Range(); to select a number in between your minspeed and your maxspeed. That will equal your current speed.

If you did minSpeed = 5;
and maxSpeed = 10;
Then you would do

Random.Range(minSpeed, MaxSpeed);

This says that you want a random number generated between your min speed and your max speed.

Please send me a pm if you require more help. Include your script.

Thanks for watching!

Hi Great Tutorial but i have a problem with writing any scripts im new to Unity and game dev in general C# will not let me write the same as you idk what to do dosn’t matter what tutorial i follow I get compile errors when you do not idk how to upload my script

Hi Thank you for the great tutorials but i have the same problems with any scripts i write or follow from tutorials C# won’t let me type
what is needed in the lines changes ( to { and { to ( at diferant times and i get compile error there are no typo,s idk how to upload
my script to show you but i type exactly like you and i get lots of errors please help i did 1st 2 vids np but 3rd problems started
im new to unity and game dev in general but at 50yrso am a long time game freak rpg junkie lol

Please send me a private message. Copy and paste your script in the message.

Thank you :slight_smile:

Thank you but i just got thru past the error taking your advice kept use the refrence and found a typo i couldn’t see i guess i wass looking to hard love
your tutorial it is a very good method to teach as i was doing the hack and slash tuttorial you and viking talked about and got stuck at video 26 of 300 or so so thank you and sorry about double post my net dropped out and i thought it didn’t post so sorry about that keep up the great work