Control Units and Give Orders! (Unity RTS Tutorial)

Control Units and Give Orders! (Unity RTS Tutorial)

Channel:
Subscribers:
566,000
Published on ● Video Link: https://www.youtube.com/watch?v=mCIkCXz9mxI



Category:
Tutorial
Duration: 17:14
172,986 views
4,076


✅ Get the Project files and Utilities at https://unitycodemonkey.com/video.php?v=mCIkCXz9mxI
Let's make a Simple RTS Control System to Select our Units and Give Orders.
This is a great base for you to expand upon, add more actions, different types of units, etc.
Stay tuned for an upcoming video covering how to make Custom Animated Cursors so we can make the game look better and give the player more context.

Control Units and Give Orders in Unity ECS!
https://www.youtube.com/watch?v=3Xjc7NjL0Gc

Modular Character System in Unity
https://www.youtube.com/watch?v=mJRc9kLxFSk

Patreon Sponsor: https://www.badadventurer.com/

We're going to start off with a basic Unit standing Idle.
First we capture the Mouse Down and Mouse Up events and store the Mouse World Position, using that we can then use Physics2D.OverlapAreaAll which returns all the Colliders within two points
Then we create a script to identify our Units and ignore objects like Rocks. We add a Visual for the Unit Selection and the Selection Area.
After that we add the ability to give our Unit a simple Move Order. The Unit is handled by the Modular Character System created in a previous video so we can easily add some move behaviour.
With the Units receiving orders then we dynamically generate some positions around the Target Move Position and send each unit to a different position in order to prevent overlapping.

And with that the RTS Control System is done!
You can use this as a base for your RTS Games and Expand upon it by adding more actions and behaviours like Attacking Enemies, Constructing Buildings, Gathering Resources and so on!

If you have any questions post them in the comments and I'll do my best to answer them.

🔔 Subscribe for more Unity Tutorials https://www.youtube.com/channel/UCFK6NCbuCIVzA6Yj1G_ZqCg?sub_confirmation=1

See you next time!

📍 Support on Patreon https://www.patreon.com/unitycodemonkey
🤖 Join the Community Discord https://discord.gg/eHjUVrm
📦 Grab the Game Bundle at https://unitycodemonkey.com/gameBundle.php
📝 Get the Code Monkey Utilities at https://unitycodemonkey.com/utils.php

#unitytutorial #unity3d #unity2d

--------------------------------------------------------------------

Hello and welcome, I am your Code Monkey and here you will learn everything about Game Development in Unity 2D using C#.

I've been developing games for several years with 7 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.

You can see my games at www.endlessloopstudios.com


--------------------------------------------------------------------

- Website: https://unitycodemonkey.com/
- Twitter: https://twitter.com/UnityCodeMonkey
- Facebook: https://www.facebook.com/UnityCodeMonkey/







Tags:
unity rts tutorial
unity rts controls
unity strategy game tutorial
unity rts
unity rts map
real-time strategy
unity age of empires
unity strategy
unity control character
unity selecting units
unity selection box
code monkey
brackeys
unity tutorial
unity tutorial for beginners
unity 2d tutorial
unity 3d
unity
game design
game development
game dev
game development unity
unity 2d
unity 3d tutorial
programming
c#
code
learn to code
learn programming