Free and open-source code for game development for all of you BADAS's out there!
Click on the script you would like, right click on the raw button, press Save As (You can also download everything as a Zip File) Be careful some scripts depend on eachother, if something doesn't work, I recommend downloading everything as a zip file.
1) Install Git: https://git-scm.com/downloads 2) cd into directory using cmd or terminal
$ cd "PATH_TO_UNITY_PROJECT_FOLDER/Assets/Scripts"
3) Copy Git Clone URL
$ git clone https://github.com/NotoriousENG/BADAS_Scripts.git
using git GUI or by running the following comands:
$ cd PATH_TO_UNITY_PROJECT_FOLDER/Assets/Scripts/BADAS_Scripts
$ git pull
https://www.youtube.com/watch?v=CnN7L-5ygoc
https://www.youtube.com/watch?v=SuuO_qMiNCw&feature=youtu.be
https://www.youtube.com/watch?v=ihBBz4PkKzw&list=PLqzDlUNiQomvrUTMh_PaGEC1z0rONWtDc
https://www.youtube.com/watch?v=2g5mTXn7Cic
https://www.youtube.com/watch?v=ihAw8O6dEu4&feature=youtu.be
Attatch to player, handles inputs and setting animator properties. A replacement for the former Move2D script.
In the animator window, click on the state you have created and in the inspector add these scripts to the appropriate states. This implementation replaces the state machine and is simpler to create new states. e.g. In the animator Idle transitions to Walking when moveMagnitude > 0. PlayerWalkBehavior will then become active and the player will moved based off of the Input.GetAxis(...) values. https://www.youtube.com/watch?v=dYi-i83sq5g&t=272s
Use a blend tree for directional movement, this way you won't have to draw transitions for every walking state for every direction. https://www.youtube.com/watch?v=32VXj5BB7wU
Needs to be an object in a scene, I recommend adding it to an Empty in the Canvas and adding whatever you will use for your text box as child of this object and the text objects as children of it. Make sure to set the Texbox, etc. freezePlayerOnDialogue will set the animator to idle and disable movement until dialogue is finished.
A Dialogue Trigger can be an NPC, a sign, an event, anything really. For right now we are using Trigger2D Collision to trigger dialogue. Add the Dialogue Trigger to your NPC (or etc.) and try loading in the sample dialogue or perhaps write your own.
Dialogue Files can be written with your favorite text editor. I used .txt but you can use any of these: https://docs.unity3d.com/Manual/class-TextAsset.html. I like to denote a new dialogue portion with an extra newline. Additionally, you can set the name for a line of dialogue by writing [NAME=TheNameYouWant] at the beginning of a line of text. This name will remain until you finish the dialogue or change it.
More Complicated, see tutorial video above.