I am just learning Unity and found your videos and i have to say: they are great. Perfect depth of explaining whats happening while not getting lost in details. Why dont you have more viewers? I will definetely watch the rest of the series and of course reproduce it :) Thank you
When you have quite a few units and tell them to move to a location because there are so many they block each other from reaching the point and just keep rotating around it as they push each other to reach it. How would we make them stop nearby the point if we have quite a few selected so that they don't keep push each other to reach it
This is a great find. I have not encountered this bug yet as I have not tested with a large number of units. I will look in to adding a bit of checks to stop the calls to make a "formation" of sorts when they reach a point that another unit has already taken!
Maybe in that case you could offset the destination position of ever unit in a grid. That way they all have their own space to sit after they reach the destination
I know that I am 3 years late, and I am relatively new to unity, but I am following along with you and am currently doing it from a first person point of view where you are controlling little mini people, and there seems to be some inconsistency with selecting my soldiers.... some times it selects them, sometimes it doesn't. I have tried calling the HandleUnitMovement in update and fixed update and other things, and nothing seems to be working. If you still reply to comments... help?
Hey man sorry to hear that. It could be a Unity version thing, but it’s hard to tell on so many factors. If it’s in first person mode, it could be a distance thing etc. I would join our discord so you can share some code there to see if that helps!
Great tutorial, though how would you go about setting a "patrol", ie. when you're holding a certain key you can then tell place a series of "markers" and the units will move from one point to the next in order of placement? Also, the movement seems inconsistent, sometimes after box-selecting units they will never be able to be unselected and sometimes units will no-longer be commandable (ie. i tell them to move but they just wont) any ideas for fixing this?
I am following your tutorials with great interest. At the moment I am still in video 3. I have seen that you have posted 11 videos. How many do you think will be necessary to explain the whole process?
Well creating a full game takes a long time. But to get the basic information you need to expand on to create your own game, maybe 10 more? Though there is so much to cover. Such as menus and sounds and animations. But for the most part my other tutorials will cover things like this too
@@followlithex Okay. Thank you very much for answering. I want to develop an RTS and your videos are helping me understand many things. I have recently started studying C #, so I know I have a long way to go yet.
@@followlithex It's hard. I have a background as an artist and 3d designer. Starting to study code from 0 is not easy. I've been looking for tutorials for a long time to learn how to create a simple RTS. The information that appears is very scattered. Your videos are one of the most concrete things I have found. Thank you very much for sharing your knowledge.
The error is telling you that you have are trying to declare a variable with a name that has already been used within that scope. So you are likely declaring the same var twice in the same script.
So first off great series, it does help a lot. Keep up the good work. But I would like to add a few stuff and some guidance. For the selection process if we use rigged ( for me at least) the mouse button selection will work only with a collider on, drag selection doesn't matter it will work. But I have a small problem with movement even though I followed to a T every time I press right click it kicks with a null expression, how to fix it , I tried giving the terrain a layer but it didnt work either . I must say that the terrain is imported and used a script to "convert" it to terrain metadata and works fine with grass trees placement etcetera beside themovement part.
The message i'm getting: NullReferenceException: Object reference not set to an instance of an object LP..FDG.Units.Player.PlayerUnit.MoveUnit (UnityEngine.Vector3 destination) (at Assets/Scripts/PlayerUnit.cs:18) LP.FDG.InputManager.Input_Handler.HandleUnitMovement () (at Assets/Scripts/Input_Handler.cs:97) LP.FDG.Player.Player_Manager.Update () (at Assets/Scripts/Player_Manager.cs:21)
Ok last spam sorry :(. Fixed it, so basically for some reason on the private NavMesh it wasn't working but when changed to public placed every unit agent in its prefab it worked fine. Hope somebody will find it usefull
Thank you for these tutorials, though I'm a year late in spotting them. Has anyone ever told you that you look like Sheldon Cooper (Big Bang Theory)? 😂 or maybe it's the just camera angle
hi man i has just try to repeat all what you show on this video but when I try to move my units Unity say "Object reference not set to an instance of an object LP.FDG.Unit.Player.PlayerUnit.MoveUnit (UnityEngine.Vector3 _destination) (at Assets/TestElements/Scripts/PlayerUnit.cs:string 20) LP.FDG.InputManager.InputHandler.HandleUnitMovement () (at Assets/TestElements/Scripts/InputHandler.cs: string 94) LP.FDG.Player.PlayerManager.Update () (at Assets/TestElements/Scripts/PlayerManager.cs:string 23)". How can I fix all these problems?
Legend! Best RTS videos on the tube
Thanks a ton! I'm really glad you think so!
I am just learning Unity and found your videos and i have to say: they are great. Perfect depth of explaining whats happening while not getting lost in details. Why dont you have more viewers?
I will definetely watch the rest of the series and of course reproduce it :) Thank you
Thank you so much! I'm really glad you are enjoying the videos! Hopefully our community will grow over time :)
This is cool mate thanks. I can clearly understand and follow what you are saying!
Thanks man! I'm glad you are enjoying the videos!
How to make your own agents keep distance to each other and also walk around the enemies while pathfinding in realtime?
This would take some work to the AI but its a great idea to add this in the future!
When you have quite a few units and tell them to move to a location because there are so many they block each other from reaching the point and just keep rotating around it as they push each other to reach it. How would we make them stop nearby the point if we have quite a few selected so that they don't keep push each other to reach it
This is a great find. I have not encountered this bug yet as I have not tested with a large number of units. I will look in to adding a bit of checks to stop the calls to make a "formation" of sorts when they reach a point that another unit has already taken!
Maybe in that case you could offset the destination position of ever unit in a grid. That way they all have their own space to sit after they reach the destination
When I just click, the selection is not possible, but when I drag, the enemy is selected. How do I write a script?
I know that I am 3 years late, and I am relatively new to unity, but I am following along with you and am currently doing it from a first person point of view where you are controlling little mini people, and there seems to be some inconsistency with selecting my soldiers.... some times it selects them, sometimes it doesn't. I have tried calling the HandleUnitMovement in update and fixed update and other things, and nothing seems to be working. If you still reply to comments... help?
Hey man sorry to hear that. It could be a Unity version thing, but it’s hard to tell on so many factors. If it’s in first person mode, it could be a distance thing etc. I would join our discord so you can share some code there to see if that helps!
Great tutorial, though how would you go about setting a "patrol", ie. when you're holding a certain key you can then tell place a series of "markers" and the units will move from one point to the next in order of placement?
Also, the movement seems inconsistent, sometimes after box-selecting units they will never be able to be unselected and sometimes units will no-longer be commandable (ie. i tell them to move but they just wont) any ideas for fixing this?
Interesting, I'm not sure where your bug is coming from. Prob an issue with removing them from your selected units list?
I am following your tutorials with great interest. At the moment I am still in video 3. I have seen that you have posted 11 videos. How many do you think will be necessary to explain the whole process?
Well creating a full game takes a long time. But to get the basic information you need to expand on to create your own game, maybe 10 more? Though there is so much to cover. Such as menus and sounds and animations. But for the most part my other tutorials will cover things like this too
@@followlithex
Okay. Thank you very much for answering. I want to develop an RTS and your videos are helping me understand many things. I have recently started studying C #, so I know I have a long way to go yet.
You will get it man just keep going!
@@followlithex It's hard. I have a background as an artist and 3d designer. Starting to study code from 0 is not easy. I've been looking for tutorials for a long time to learn how to create a simple RTS. The information that appears is very scattered. Your videos are one of the most concrete things I have found. Thank you very much for sharing your knowledge.
It’s likely due to setting the die function before the health
Can i get some help because when i try to box select it will work but wont stop
I believe this was helped in the discord community yeah?
I need help because when i go into unity it comes up with error cs0136
The error is telling you that you have are trying to declare a variable with a name that has already been used within that scope. So you are likely declaring the same var twice in the same script.
@@followlithex cool im planing to rewrite the script but thanks ill keep thst in mind
So first off great series, it does help a lot. Keep up the good work. But I would like to add a few stuff and some guidance. For the selection process if we use rigged ( for me at least) the mouse button selection will work only with a collider on, drag selection doesn't matter it will work. But I have a small problem with movement even though I followed to a T every time I press right click it kicks with a null expression, how to fix it , I tried giving the terrain a layer but it didnt work either . I must say that the terrain is imported and used a script to "convert" it to terrain metadata and works fine with grass trees placement etcetera beside themovement part.
The message i'm getting:
NullReferenceException: Object reference not set to an instance of an object
LP..FDG.Units.Player.PlayerUnit.MoveUnit (UnityEngine.Vector3 destination) (at Assets/Scripts/PlayerUnit.cs:18)
LP.FDG.InputManager.Input_Handler.HandleUnitMovement () (at Assets/Scripts/Input_Handler.cs:97)
LP.FDG.Player.Player_Manager.Update () (at Assets/Scripts/Player_Manager.cs:21)
Ok last spam sorry :(. Fixed it, so basically for some reason on the private NavMesh it wasn't working but when changed to public placed every unit agent in its prefab it worked fine. Hope somebody will find it usefull
Yep! As I was reading this I assumed it had something to do with the NavMesh xD Glad you were able to find the solution!
@@followlithex Haha thank you although I still don't get as to why NavMesh wasn't working on private
Can use android platform?
Yes you can but some code is a bit different for different types of touch controlls
amazing!!!!!!!!!!!!!!!!!!
Thank you so much!
Thank you for these tutorials, though I'm a year late in spotting them. Has anyone ever told you that you look like Sheldon Cooper (Big Bang Theory)? 😂 or maybe it's the just camera angle
Haha nope! I haven't heard that one yet! lol
Wow
Hope you found it helpful :)
hi man i has just try to repeat all what you show on this video but when I try to move my units Unity say "Object reference not set to an instance of an object
LP.FDG.Unit.Player.PlayerUnit.MoveUnit (UnityEngine.Vector3 _destination) (at Assets/TestElements/Scripts/PlayerUnit.cs:string 20)
LP.FDG.InputManager.InputHandler.HandleUnitMovement () (at Assets/TestElements/Scripts/InputHandler.cs: string 94)
LP.FDG.Player.PlayerManager.Update () (at Assets/TestElements/Scripts/PlayerManager.cs:string 23)". How can I fix all these problems?
This error means that you likely don’t have something set in either your hierarchy or declared in your scrip
You can double click the error for it to take you to the scrip and show you the line :)