Very helpful, but I was wondering how am I supposed to learn what and what not is supposed to be capitalized and what to put in brackets etc. ? Or will this just be learnt over a long time after using it for a while?
Hi there, thanks for your video it helps me alot. I just have 1 issue tho, when my main camera 'shoots' capsules, the capsules arent falling down cause of the gravity. They just stay at the place where they were created. I've checked the gravity options in the Project settings, everything looks fine.. Any tips?
Where do I attach the shoot script? I have my scene and character with fireballs. Do I attach it to the fireball prefab or do I attach it to my character's hand?
@talentedguy30 you must have your object (that you want it to shoot) selected (in your case your char's hand) and drag the script on it. As seen at 5:37.
@contak1212 I am fed up with this thing now. I always get errors even when i do exactly as you said Could you please create the shoot script for me? for the prefab I put prefabfireball and i have a spawnpoint called Spawn and I placed the fireball prefab with the shoot script. Unity is suppose to be easy on the begiinners.
please help i put in all the right stuff at 5:37 mins but it keeps saying expected semi-colon at the end ive deleted the script several times and redone but the same thing keeps coming up can anyone help me?
To everyone who has Bullets that just drop and do not shoot off! Make sure every letter is either Capitalized or Lowercased the way his is! I had "Forward" capitalized and it needed to be "forward". Simple stupid stuff. haha
I must say, this is a remarkably helpful video. You explain the scripting terms very nicely, and the things whose meaning I wasn't too sure of in the past (*cough*TORNADOTWINS TUTORIALS*cough*) I now understand.
how could i make the bullet spawn a little in front of my camera, so if i have my camera mounted on an object how could i make the bullet spawn forward enough that it doesn't collide with what my camera is mounted on.
@funnycunt83 you have to give it a different button input, instead of "Jump" give it "leftmouse" then make a new input for leftmouse, the positive button is called mouse 0
You are AWESOME! my friend, and your sooo smart too, the one thing i am having trouble with is the JavaScript, i am a retard when it comes to that lol, so i was wondering what should i do to learn JavaScripts or any kind of other scripts? should i find books to read for it? because I know nothing about scripting, please help me out I really need some help, thank you :)
ok im stuck on the bullet script and when ever im ready to play it or says,"Assets/Bullet.js(1,1): BCE0044: expecting EOF, found 'var'." oh and also i dont have the shootforce or any of the tabs you have and i did everything the exact same way you did
Hi,thanks for ur tutorial.I'm useing this script to make a side-scrolling game, . the script is like this: var prefebmoney:Transform; var power: float; function Update () { if (Input.GetKeyDown (KeyCode.Z)) var instancemoney = Instantiate(prefebmoney,transform.position,transform.rotation); instancemoney.rigidbody.velocity =transform.right*power; } I'd like to change the shooter's direction as my character's,how can i rewrite this script?thanks
Hey I'm using Unity 3.4 and after using the same shoot script, I get an error stating " MissingMethodException: Method not found: 'UnityEngine.Rigidbody.Addforce'. " Any suggestions on how to fix it ?
@infiniteammoinc Hey thanks for the quick response, I really appreciate it :D And ya the capital F did the trick, I can finally shoot ! lol Thanks again :D
Hey I'm using Unity 3.4 and after using the same shoot script, there is an error stating " MissingMethodException: Method not found: 'UnityEngine.Rigidbody.Addforce'. " Any suggestions on how to fix it ?
Great tutorials!!! this is the first Unity tutorial i watched, and i've seen that it is great also for beginners! when i first got unity i watched this tutorial and understand unity very well, thanks Alex!!!!!!!!!!!!!!!! :)
I am making a game where you are a ball and you roll around, similar to the morph ball in Metroid Prime. I have made quite a few games before just simple goofy ones because I have only been using Unity for about 7 months and I have been scripting for just over a year. I am having trouble trying to get the ball to actually roll as it is moving. All it can do right now is move, turn, and boost. Could you give me some ideas on how to make it roll?
I know maya pretty well, but now i wanted to do a game... for example for a FPS game, can I make characters in maya, rig them, texture, and do animation, to then use Unity to program it all? like to make the character move forward, and use a walk cycle animation, when i hit W....?
I'm new to programming, and this is how i presume it works xD any tips would be appreciated.
When I drag the prefab Bullet to the Shoot script, it doesn't do anything and there is no arrow for a drop down menu like you did it, instead there is a target icon, that when click, will open a window that shows everything in my scene.
For some reason, everytime I code that program, i'm sure it's exact and when I run it does work, it shoots out object but theres an error at the bottom of the screen saying "NullReferenceException: Object reference not set to an instance of an object." I don't quite understand that. help?
I just picked up Unity about a month ago and purchased a Book/DVD combo to help me understand the software and get going on creating a game. I have to say that, without a doubt, your tutorials put the publication (which I won't name) I purchased to shame. I appreciate the fact that you would take the time to help people whom you may never even meet understand how all of this works. Very big of you.
@AwesomeStep select your cubes, then go to: Component > physics> then it says, "rigidbody". Click on that and they will fall (insta physics, insaaaaaane).
@tehham well i have it sorted now and have done for a long time....... but the "varshootForce:float;" allows me to alter the shoot force within unity and it was set to 1000 at first...... but allis good now ^_^
OK that was a really good tutorial it almost completely works...... the only problem is that my prefab just drops and does not propel forward here is the script as copy/pasted from my game
@ashiron2 I'm no expert, but it seems you haven't defined shootForce. So (I'm guessing) unity initialises it as 0 by default. Set it to something like 10 or 50 and see how it works.
Okay, so I'm making this FPS game but you don't start out with any guns. Instead you walk up to a turret and shoot all the zombies. But I have no idea what to say in the script for the character to walk up to the turret and 'enter' it! I would like the player to push the space bar to enter it, and to exit it. PLEASE HELP!!!! thank you
hi i have a problem with the scripting.... i checked it about 10 times and it's all the same but an error is popping out everytime i press run and it tells me to put a semicolon at the end of line - 7 . but i already have a semi colon at the end of that line exactly liek the tutorial. why is the error still popping out? thanks
As I understood the Jump word in the script is the button space, but i have another movement script that i need space button for, what should i type for left click like in a normal fps game?
@JackAida youll need to add a rigid body component. select your bullet prefab in the hierarchy and click component-->rigid body. now click apply in the inspector to apply this change to the entire prefab.
When I run the shootscript, it tells me "The prefab you want to instantiate is null". I've double checked it and double checked it again, I'm sure it's exactly what you have.
Thanks a lot for making these. I really appreciate the way you explain your way through scripting, that is really helpful for a complete scripting novice such as myself. Up until this point I have just copied other scripts to get close enough to the results I wanted, but now I can begin to edit these without a barrage of error messages. So once again, thanks alot.
I'm used to working in c++, but I have to work in unity for school. It's really scary how easy this is. And still powerfull as well. Most easy to use engines are really slow.
@hedanit0 Yeah, Unity's the first "package engine" that I've actually liked - because it doesn't get in your way while providing really powerful tools that are easy to use. (at least, most of the time)
dude ur freakin crazy at this stuff can you help me with some stuff just started were should i start?? i would like to make characters like wolfs and such you knw how??
@XxXSorry19XxX If you've never made a game before, I'd suggest playing around with primitives (cubes, spheres, etc) b4 trying to make a game with full 3D models or even 2D art. Get the hang of the basics first, then work your way up.
Most things with full 2D art are going to require Photoshop/Painter knowledge, 3D models require an experienced modeller using Blender or 3DS Max or Maya etc...
Best to start small, with something you can finish. Try cloning Pong, Pac Man or Tetris for example. :)
i have a problem with your shooting script where when i shoot after rotating about 180 degrees it wont shoot past it. so i only have like a 180 degree view for shooting instead of full rotation.
srry bout the message but i found the error but dont know how to fix the erroe is there is no rigidbody attached to Bullet(Clone) but i put it in my script
@mylespol You have to attach a rigidbody to the bullet prefab in the editor. (Component -> Physics-> Rigidbody) Make sure it's on the prefab, otherwise it won't get replicated to the bullets that you spawn. :)
Nice man 5 out of 1000. I was messing around in the unity site tut and man there complex and boring. You made it a lot easier. I can totally see Mac making a console soon (they just gata) I made the switch from pc to mac and I'm never looking back. Games are just so much essayer to make on a mac because of the work flow from C4D to Unity is a snap (for animation) Keep on rock man good stuff
i saw other tutorials doing more or less the same, with at least twice the amount of code. which is really hard to get into , especially for a non-programmer for me, trying to understand it.
I like how the 3D controls are similar to Maya's. It makes me think i have a chance of getting a game going from my sotckpile of models and characters. :)
Cool tutorials, i would like to know how do you make it so bullets for example start disapearing afther 10 are created.
I just did the Lerpz Scape tutorial, so there is this prefab where you spawn enemyes, and i dont know how to make it so it only spawns the amount i want and not allways that it gets in the spawn range.
just add in the script for the bullet Destroy(gameObject, 10); and it will destroy the gameObject that the script is on after 10 seconds. Easier to do it after time. if you have no script on your bullets, just add the script "Times ObjectDestructor" which comes default unity, and pick the time it takes for it to be deleted. Hope this helps :)
Great video, it really helped me out. Thank you.
pfrazer1985 6 days ago
Very helpful, but I was wondering how am I supposed to learn what and what not is supposed to be capitalized and what to put in brackets etc. ? Or will this just be learnt over a long time after using it for a while?
CadenBurleson 3 weeks ago
How could someone dislike this? Your tutorials are an amazing help, thank you so much guy
Minsinius 3 weeks ago
hey i was wondering if you could make a tutorial on creating a timer function so that when time runs out the game ends
Thanks!
1HiddenChaos1 3 weeks ago
wow... that's just amazing ... you are like god... created something out of nothing...
BonneBreaker 4 weeks ago 2
thank you so much. How can i rescale the fireball's flame so it is not reaching the top of the skybox? I need to reduce it.
talentedguy30 1 month ago
Hi there, thanks for your video it helps me alot. I just have 1 issue tho, when my main camera 'shoots' capsules, the capsules arent falling down cause of the gravity. They just stay at the place where they were created. I've checked the gravity options in the Project settings, everything looks fine.. Any tips?
contak1212 1 month ago
@contak1212 I just had to add the Rigidbody component from the menu. Got it :)
contak1212 1 month ago
Where do I attach the shoot script? I have my scene and character with fireballs. Do I attach it to the fireball prefab or do I attach it to my character's hand?
talentedguy30 1 month ago
@talentedguy30 you must have your object (that you want it to shoot) selected (in your case your char's hand) and drag the script on it. As seen at 5:37.
contak1212 1 month ago
@contak1212 I am fed up with this thing now. I always get errors even when i do exactly as you said Could you please create the shoot script for me? for the prefab I put prefabfireball and i have a spawnpoint called Spawn and I placed the fireball prefab with the shoot script. Unity is suppose to be easy on the begiinners.
talentedguy30 1 month ago
@talentedguy30 Hope it helps
var prefabBullet:Transform;
var shootForce:float;
function Update () { if(Input.GetButtonDown("Jump")) { var instanceBullet = Instantiate(prefabBullet, transform.position, Quaternion.identity); print(instanceBullet); instanceBullet.rigidbody.AddForce(transform.forward * shootForce); }
}
contak1212 1 month ago
how do i Duplicate? and snap to create? im pressing alot of buttons and nowt happening lol
RobbieDee2k12 1 month ago
@RobbieDee2k12 it's pretty easy once you know it !
to duplicate you have to do : ctrl + D, it will duplicate at the same spot.
to snap you have to hold the ctrl button while moving your object.
Hope it helps!
contak1212 1 month ago
I have this error in line 8- UCE0001: ';' expected. Insert a semicolon at the end.
Can anyone tell me whats wrong?
var prefabBullet:Transform;
var shootForce:float;
function Update ()
{ if(Input.GetButtonDown("Jump")) { var instanceBullet - Instantiate(perfabBullet, transform.position, Quaternion.identity); instanceBullet.rigidbody.AddForce(transform.forward * shootForce); }
}
Minecrafterman12 1 month ago
Unity 3.5.0 problem:
The variable prefabBullet of 'Shoot' has not been assigned.
here is my script:
var prefabBullet:Transform;
function Update () { if(Input.GetButtonDown("Jump")) { var instanceBullet = Instantiate(prefabBullet, transform.position,
Quaternion.identity); }
}
11horsepower 2 months ago
@11horsepower umight need to make sure your objects name match
robin7ray 1 month ago
@robin7ray I fixed it, but thanks though.
11horsepower 1 month ago
Thank you, solved my problem...
hotnindza 2 months ago
Thank you, solved my problem...
hotnindza 2 months ago
Thank you, solved my problem...
hotnindza 2 months ago
This is truly amazing tutorial, So grateful of you !
amolwagh333 2 months ago
i am actually entertained by this game. :D
baozer900 2 months ago
can you do a tutorial as a continuation on this, like a script on how to remove the bullets for the game.
FMAfan0444 2 months ago
Comment removed
AceOfSeven 3 months ago
infiniteammoinc, how can you make it have a weapon for a FPS?
Buckalo24 3 months ago
please help i put in all the right stuff at 5:37 mins but it keeps saying expected semi-colon at the end ive deleted the script several times and redone but the same thing keeps coming up can anyone help me?
OnScreenIdiots 3 months ago
sorry im new to this, how do i make it a left click instead of jump?
CALVINATOR97 3 months ago in playlist Liked videos
@CALVINATOR97 Fire1 is left click, otherwise make your own input using mouse 0 as the positive
AceOfSeven 3 months ago
@AceOfSeven thanks man :)
CALVINATOR97 3 months ago
Comment removed
CALVINATOR97 3 months ago
dude !! i'm dreaming..
WMVideos20 4 months ago
When i go into unity i can only see the floor grid, nothing else, no textures on anything.. :i could someone help me ?
MrsShaiaz 4 months ago
Excellent tutorials, well paced and good level of detail, thanks a lot. One question though... Doing this in C#,
GameObject instanceBullet = (GameObject)Instantiate(prefabBullet, transform.position, Quaternion.identity);
instanceBullet.rigidbody.AddForce(transform.forward * shootforce);
Game compiles fine, however when I shoot I get this error:
InvalidCastException: Cannot cast from source type to destination type.
Shoot.Update () (at Assets/Scripts/Shoot.cs:34)
Anyone please help!!!
mickpal 4 months ago
To everyone who has Bullets that just drop and do not shoot off! Make sure every letter is either Capitalized or Lowercased the way his is! I had "Forward" capitalized and it needed to be "forward". Simple stupid stuff. haha
MrStixxx96 4 months ago
i think i fail. My bullet has rigidbody but wont fall. probably just me being fail but thats what he did so i'm like what. Help anyone?
Hamgamgo 4 months ago
Please help I put in: var prefabBullet:Transform;
function Update ()
{ if(Input.GetButtonDown("Jump")) { var instanceBullet - Instantiate(prefabBullet, transform.position, Quaternion.identity); }
}
and it comes up with an error saying Assets/Shoot.js(7,35):UCE0001:';' expected.Insert a semicolon at the end.
PLEASEE help! PLEASE!
lolcorrupt 4 months ago
@lolcorrupt var prefabBullet:Transform;
var shootForce:float;
function Update ()
{ if(Input.GetButtonDown("Fire1")) { var instanceBullet = Instantiate(prefabBullet, transform.position, Quaternion.identity); instanceBullet.rigidbody.AddForce(transform.forward * shootForce); }
}
MrWhatsitlike 4 months ago
I must say, this is a remarkably helpful video. You explain the scripting terms very nicely, and the things whose meaning I wasn't too sure of in the past (*cough*TORNADOTWINS TUTORIALS*cough*) I now understand.
Thanks!
DudemanofAwesome 4 months ago
Whenever I select "Play" all my object just fall. How do I make them stay in place?
DarkChaos451 4 months ago
how could i make the bullet spawn a little in front of my camera, so if i have my camera mounted on an object how could i make the bullet spawn forward enough that it doesn't collide with what my camera is mounted on.
zcstover 5 months ago
Comment removed
zcstover 5 months ago
could you help me make a Nightcrawler style teleporting script like in the X-Men games. that would be cool.
2112inuyasha 5 months ago
how do i shoot with mouse click?
funnycunt83 5 months ago
@funnycunt83 you have to give it a different button input, instead of "Jump" give it "leftmouse" then make a new input for leftmouse, the positive button is called mouse 0
zcstover 5 months ago
i get this warning: the referenced script on this Behaviour is missing! UnityEngine.object, vector3, Quaternion)
Game still run but it won't shoot forward just drop it right down
gangpor 5 months ago
how did you make the camera move like that?
DeathShadowGamin 5 months ago
I don't know what to attach now.. I get this error:
MissingReferenceException: The variable prefabBullet of 'Shoot' doesn't exist anymore.
Gondorius 5 months ago
Awesome tutorials! The best I've seen on Youtube. Thanks a lot!
JRulkiewicz 5 months ago
You are AWESOME! my friend, and your sooo smart too, the one thing i am having trouble with is the JavaScript, i am a retard when it comes to that lol, so i was wondering what should i do to learn JavaScripts or any kind of other scripts? should i find books to read for it? because I know nothing about scripting, please help me out I really need some help, thank you :)
feraidun 5 months ago
If only it was as simple as gamemaker...lol thatd be great
Mr0Cellobot 6 months ago
@Mr0Cellobot making 3d games like this in game maker is a whole lot more complicated than this, imo
uncapitain 5 months ago
@uncapitain i know
Mr0Cellobot 3 months ago
ok im stuck on the bullet script and when ever im ready to play it or says,"Assets/Bullet.js(1,1): BCE0044: expecting EOF, found 'var'." oh and also i dont have the shootforce or any of the tabs you have and i did everything the exact same way you did
Mr0Cellobot 6 months ago
This has been flagged as spam show
kusoliang 6 months ago
Hi,thanks for ur tutorial.I'm useing this script to make a side-scrolling game,
.
the script is like this:
var prefebmoney:Transform;
var power: float;
function Update () {
if (Input.GetKeyDown (KeyCode.Z))
var instancemoney = Instantiate(prefebmoney,transform.position,transform.rotation); instancemoney.rigidbody.velocity =transform.right*power;
}
I'd like to change the shooter's direction as my character's,how can i rewrite this script?thanks
kusoliang 6 months ago
Hey I'm using Unity 3.4 and after using the same shoot script, I get an error stating " MissingMethodException: Method not found: 'UnityEngine.Rigidbody.Addforce'. " Any suggestions on how to fix it ?
CRonaldo7soccer 6 months ago
@CRonaldo7soccer the "f" in "force" needs to be capitalized, i.e.: rigidbody.AddForce
infiniteammoinc 6 months ago 5
@infiniteammoinc Hey thanks for the quick response, I really appreciate it :D And ya the capital F did the trick, I can finally shoot ! lol Thanks again :D
CRonaldo7soccer 6 months ago
Hey I'm using Unity 3.4 and after using the same shoot script, there is an error stating " MissingMethodException: Method not found: 'UnityEngine.Rigidbody.Addforce'. " Any suggestions on how to fix it ?
CRonaldo7soccer 6 months ago
Great tutorials!!! this is the first Unity tutorial i watched, and i've seen that it is great also for beginners! when i first got unity i watched this tutorial and understand unity very well, thanks Alex!!!!!!!!!!!!!!!! :)
PcPlayer992 6 months ago
really enjoy ur vidioes
gangpor 6 months ago
Anybody know how to make the bullet travel in any direction you want it to because when i shoot it from my gun it goes to the left.
BTIXist 6 months ago
@BTIXist Its very simple just send me your script and i will fix it for you. :)
carfenaticman123 6 months ago
var prefabBullet:Transform;
var shootForce:float;
function Update()
{ if(Input.GetButtonDown("Jump")) { var instanceBullet - Instantiate(prefabBullet, transform.position, Quaternion.identity) ; instanceBullet.rigidbody.AddForce(transform.forward * shootForce); }
}
where is the problem here???
iliri6600 7 months ago
@iliri6600 aha! the "var instanceBullet - Instantiate..."! it should be "var instanceBullet = Insta.....". you forgot the '=' sign.
PcPlayer992 6 months ago
@iliri6600
If you Havent already done it :)
var prefabBullet:Transform;
var shootforce:float;
function Update ()
{ if(Input.GetButtonDown("Fire1")) { var instanceBullet = Instantiate( prefabBullet, transform.position, Quaternion.identity); instanceBullet.rigidbody.AddForce(transform.forward * shootforce); }
}
ThreeDForYou 6 months ago
Comment removed
ThreeDForYou 6 months ago
@iliri6600 to me it says :Assets/shoot.js(9,31): unexpected char: 0xFFD.
what should i do! im terifieed XD
covenantelite98 6 months ago
alright so i have a wierd problem whenever i use a rigid body for anything it immediately disappears
naruto82494 7 months ago
hey, where do you get the shadow and the lights? i didn't have it even if i change the direction of the point light. please tell me how ASAP
PcPlayer992 7 months ago
Comment removed
Cyborgmonkey145 8 months ago
I am making a game where you are a ball and you roll around, similar to the morph ball in Metroid Prime. I have made quite a few games before just simple goofy ones because I have only been using Unity for about 7 months and I have been scripting for just over a year. I am having trouble trying to get the ball to actually roll as it is moving. All it can do right now is move, turn, and boost. Could you give me some ideas on how to make it roll?
The13thROCKER 8 months ago in playlist Unity Tutorials
Thanks a lot. Very helpful tutorials.
farooqaaa 8 months ago
thank you so much!
I know maya pretty well, but now i wanted to do a game... for example for a FPS game, can I make characters in maya, rig them, texture, and do animation, to then use Unity to program it all? like to make the character move forward, and use a walk cycle animation, when i hit W....?
I'm new to programming, and this is how i presume it works xD any tips would be appreciated.
tarrizzzzzzzzz 8 months ago
How do you drag the objects to make them bigger? I'll sub if you answer.
Halo4Follower 8 months ago
@Halo4Follower derp.
Viannima 8 months ago
@Viannima lol I figured out like 5 minutes after I asked it, lawl.
Halo4Follower 8 months ago
@Halo4Follower lol, press r on your keyboard and drag in the middle of the thingy (axes) which appares...
tarrizzzzzzzzz 8 months ago
It seems like my bullets are cloning but they are invisible. Is there anyway to change the look of the bullet?
bryanthomas108 8 months ago
When I drag the prefab Bullet to the Shoot script, it doesn't do anything and there is no arrow for a drop down menu like you did it, instead there is a target icon, that when click, will open a window that shows everything in my scene.
EnduringInsanity 8 months ago
thanks dude
YoungChristopher1 9 months ago
thank inormasinya ye broooo...!!!!
GooD luck
volcom85345311 9 months ago
@smaschannel you have to first give your enemy life points and when they equal 0 for it to be destroyed.
then you have to tag your bullets, Then tell your enemy when your bullet collides with it to it subtracts a life point.
dwillztxnew 9 months ago
just a quick question:
when i shoot, i can only shoot in a few directions, but i want to be able to shoot 360 degrees around me. How would one do that?
btw great tutorial!
sinterklaas1212 9 months ago
a shooting function with collision and regular physics all in one line? You sir blew my mind.
4863log 9 months ago
For some reason, everytime I code that program, i'm sure it's exact and when I run it does work, it shoots out object but theres an error at the bottom of the screen saying "NullReferenceException: Object reference not set to an instance of an object." I don't quite understand that. help?
GaryMc10 10 months ago
spawning boxes: the variable prefab bullet of shoot has not been assigned
70amazed 10 months ago
Howdy,
I just picked up Unity about a month ago and purchased a Book/DVD combo to help me understand the software and get going on creating a game. I have to say that, without a doubt, your tutorials put the publication (which I won't name) I purchased to shame. I appreciate the fact that you would take the time to help people whom you may never even meet understand how all of this works. Very big of you.
-Rich from Texas
solo24601 10 months ago
How do you apply physics to the blocks to make them fall, mine arent falling D:
AwesomeStep 10 months ago
@AwesomeStep select your cubes, then go to: Component > physics> then it says, "rigidbody". Click on that and they will fall (insta physics, insaaaaaane).
MrLolman666 10 months ago
@MrLolman666 Thanks dude :)
AwesomeStep 10 months ago
Thx you
But I have some problem
I can move and shoot the box,
but, the box (bullet) went through everything which suppose to be reflected.
Need help T T
forjustice 11 months ago
Comment removed
mudittuli 11 months ago
Comment removed
mudittuli 11 months ago
so I have a script attached to a prefab, and I want to access some variable on the script, how do I do that ?
mudittuli 11 months ago
can you make a Tutorial on how to make it delete the objeceds after 5 seconds or so
for Shooting :)
geoman298 11 months ago
Thank you for this!
I'm subscribing. ;D
Laajayyjayy 11 months ago
how i can make taht blocks move by those squares?
Azyzil 1 year ago
thank you
LIKUIDFLAEME 1 year ago
@tehham well i have it sorted now and have done for a long time....... but the "varshootForce:float;" allows me to alter the shoot force within unity and it was set to 1000 at first...... but allis good now ^_^
ashiron2 1 year ago
Space, space, space
Wohooooooo
Nice tut! Will help me :D
mspacapan 1 year ago
For 2D art is it possible to use a sketch you have scanned onto your computer?
iPureRapid 1 year ago
OK that was a really good tutorial it almost completely works...... the only problem is that my prefab just drops and does not propel forward here is the script as copy/pasted from my game
var prefabBullet:Transform;
var shootForce:float;
function Update()
{ if(Input.GetButtonDown("Jump")) { var instanceBullet - Instantiate(prefabBullet, transform.position, Quaternion.identity); instanceBullet.rigidbody.AddForce(transform.forward * shootForce); }
}
ashiron2 1 year ago
@ashiron2 I'm no expert, but it seems you haven't defined shootForce. So (I'm guessing) unity initialises it as 0 by default. Set it to something like 10 or 50 and see how it works.
tehham 1 year ago
Thank you for your tutorial It really helped my understanding more of the coding thats involved
W4RH4WK117 1 year ago
Really good guide, was very helpful. Many thanks
lithiumproject 1 year ago
@lithiumproject sorry I acedently clicked vote down :(
XlyenAnimation 1 year ago
whenever i do this i dont get the area to put my prefab in, as you explain in 6:21
MrMed123123 1 year ago
I have a character with an animation (waving a wand) is there a way to stall the bullet so it will shoot a second later after spacebar is pressed?
kangataz45 1 year ago
I made the bullet a physical object, but it won't fall. What might I have done wrong?
grossnesstudeos 1 year ago
this is extremely helpful I was lost until i watched these videos
TheMrEmmster 1 year ago
Very useful man, i was looking for this kind of fast approach to start coding a game, and the original documentation is like reading a dictionary ; )
Thanks from Montevideo, Uruguay
matiasrondan 1 year ago
Okay, so I'm making this FPS game but you don't start out with any guns. Instead you walk up to a turret and shoot all the zombies. But I have no idea what to say in the script for the character to walk up to the turret and 'enter' it! I would like the player to push the space bar to enter it, and to exit it. PLEASE HELP!!!! thank you
wrm186 1 year ago
why is this not in HD?
mollymollusk 1 year ago
Great tutorial, I looked around for awhile and couldnt find anything that would get me started till now, Thanks!
PaulThomasAsh 1 year ago
hi i have a problem with the scripting.... i checked it about 10 times and it's all the same but an error is popping out everytime i press run and it tells me to put a semicolon at the end of line - 7 . but i already have a semi colon at the end of that line exactly liek the tutorial. why is the error still popping out? thanks
xypter1 1 year ago
how do I do instead of jump to squeeze the left mouse button?
skenerz 1 year ago
@skenerz if(Input.GetMouseButton(0) or something like that
dranoel1963 1 year ago
really nice! do you know anything about work with 3d max an unity or it is simply merge the stuff from 3d max to unity? thanks for the tutorial!
SebasChilloutXyZ 1 year ago
Can I ask how to make script that reacts on mouse click? like GetButtonDown but for click of mouse.
MrEsoMafi 1 year ago
this is the worst demonstration ever
TheCalzone99 1 year ago
what is the esiest way to make a sniper type game
08rollie 1 year ago
As I understood the Jump word in the script is the button space, but i have another movement script that i need space button for, what should i type for left click like in a normal fps game?
eragonrex1 1 year ago
my cubes dont colide with things
JackAida 1 year ago
@JackAida youll need to add a rigid body component. select your bullet prefab in the hierarchy and click component-->rigid body. now click apply in the inspector to apply this change to the entire prefab.
jdwhite54 1 year ago
good scripting tutorial for unity
jehaddrubi 1 year ago
@infiniteammoinc yes, several different things. First I tried what you did, then I tried the bullet object itself, nothing wants to work...
DarkFlame7755 1 year ago
When I run the shootscript, it tells me "The prefab you want to instantiate is null". I've double checked it and double checked it again, I'm sure it's exactly what you have.
DarkFlame7755 1 year ago
@DarkFlame7755 Have you plugged anything into the prefab variable in the inspector yet?
infiniteammoinc 1 year ago
@DarkFlame7755 null means that nothing has been selected
FTD0Productions 11 months ago
@DarkFlame7755 i get the same problem
mrthebigc1 8 months ago
nice =)
Alpj89 1 year ago
Thanks a lot for making these. I really appreciate the way you explain your way through scripting, that is really helpful for a complete scripting novice such as myself. Up until this point I have just copied other scripts to get close enough to the results I wanted, but now I can begin to edit these without a barrage of error messages. So once again, thanks alot.
SentOnFriday 1 year ago
k. can this engine be used to make 2d games?
fireman59000 1 year ago
@fireman59000 yes, instead of using the perspective view use the orthographic view instead.
HackHunters 1 year ago
i wish i could hire this guy!!!!
Future6556 1 year ago
I'm used to working in c++, but I have to work in unity for school. It's really scary how easy this is. And still powerfull as well. Most easy to use engines are really slow.
hedanit0 1 year ago 6
@hedanit0 Yeah, Unity's the first "package engine" that I've actually liked - because it doesn't get in your way while providing really powerful tools that are easy to use. (at least, most of the time)
infiniteammoinc 1 year ago
Yeah What xxxsory19xxx said!!!!!!!
Future6556 1 year ago
dude ur freakin crazy at this stuff can you help me with some stuff just started were should i start?? i would like to make characters like wolfs and such you knw how??
XxXSorry19XxX 1 year ago
@XxXSorry19XxX If you've never made a game before, I'd suggest playing around with primitives (cubes, spheres, etc) b4 trying to make a game with full 3D models or even 2D art. Get the hang of the basics first, then work your way up.
Most things with full 2D art are going to require Photoshop/Painter knowledge, 3D models require an experienced modeller using Blender or 3DS Max or Maya etc...
Best to start small, with something you can finish. Try cloning Pong, Pac Man or Tetris for example. :)
infiniteammoinc 1 year ago 3
@XxXSorry19XxX if you are still planning on making a game inbox me. im a (somewhat) experieced modeler and skinner/texturer.
RenekaStudios 1 year ago
i have a problem with your shooting script where when i shoot after rotating about 180 degrees it wont shoot past it. so i only have like a 180 degree view for shooting instead of full rotation.
any help much appreciated.
karlandjaketv 1 year ago
srry bout the message but i found the error but dont know how to fix the erroe is there is no rigidbody attached to Bullet(Clone) but i put it in my script
mylespol 2 years ago
@mylespol You have to attach a rigidbody to the bullet prefab in the editor. (Component -> Physics-> Rigidbody) Make sure it's on the prefab, otherwise it won't get replicated to the bullets that you spawn. :)
infiniteammoinc 2 years ago
Nice man 5 out of 1000. I was messing around in the unity site tut and man there complex and boring. You made it a lot easier. I can totally see Mac making a console soon (they just gata) I made the switch from pc to mac and I'm never looking back. Games are just so much essayer to make on a mac because of the work flow from C4D to Unity is a snap (for animation) Keep on rock man good stuff
VUriyV 2 years ago
Hey i am new to Unity, How do you import C4D models into Unity
kieranblacker 1 year ago
@kieranblacker i dont know i started unity 1 year ago!!
Future6556 1 year ago
@kieranblacker i dont know
Future6556 1 year ago
i took the code
if(Input.GetButtonDown("Jump")
and change Jump to Sites. how do u make it when i press z the objec the script is in moves?
superroblox 2 years ago
Nice work!
SkyWhyTwo 2 years ago 7
Great tutorial.
AiotGynoid 2 years ago 14
oh my gosh thank you for this tutorial!! your games are freakin awesome by the way.
maddsketch 2 years ago 2
THANK YOU! 5*, Subscribed.
Kamrua 2 years ago
Hey your the only understandable person doing these tutorials, keep it up!
MGuniverse 2 years ago
@MGuniverse yeah Agree... :)
Seryosin 2 years ago
yea .very informative, and on a good level too.
i saw other tutorials doing more or less the same, with at least twice the amount of code. which is really hard to get into , especially for a non-programmer for me, trying to understand it.
but i gotta learn it. i need it for work soon :D
cujorius 2 years ago
dude you are "the man"
jekcheck 2 years ago
Great tutorial. I hope more like this.
kyron88 2 years ago
great tutorial you should do a tutorial for javascript
TheInventorL 2 years ago
@TheInventorL oh yah! That would be nice! @.@
Seryosin 2 years ago
really good... gave me a good insight.. look forward to more tutorials
EvanLeonDawod 2 years ago
In Another Brothel: 3D
Hehe, I kid, these tutorials are awesome. Looking forward to more...
deadeye503 2 years ago
I like how the 3D controls are similar to Maya's. It makes me think i have a chance of getting a game going from my sotckpile of models and characters. :)
drOffset 2 years ago
Cool tutorials, i would like to know how do you make it so bullets for example start disapearing afther 10 are created.
I just did the Lerpz Scape tutorial, so there is this prefab where you spawn enemyes, and i dont know how to make it so it only spawns the amount i want and not allways that it gets in the spawn range.
Hope i make myself clear XP
blackclawscat 2 years ago
You could add a script to your bullet that keeps track of time and after a second or so deletes the prefab it is a component of.
TornadoTwins 2 years ago
just add in the script for the bullet Destroy(gameObject, 10); and it will destroy the gameObject that the script is on after 10 seconds. Easier to do it after time. if you have no script on your bullets, just add the script "Times ObjectDestructor" which comes default unity, and pick the time it takes for it to be deleted. Hope this helps :)
steamisM50 2 years ago
Great job! I have been very useful to start with software.
Thanks.
murdokiler 2 years ago
I really enjoyed this.
Nicely setup with the little video window haha.
Great tutorial! I hope you continue it as a series. :)
WillP999 2 years ago
Great job! When I finish with my as3 stuff I'm going strait to Unity.
oldschool31 2 years ago