Matt Wester
Matt Wester
  • 23
  • 165 202
Point and Click Movement || Unity 2021 Tutorial
In this short tutorial, I explain quickly how to set up a point and click movement system in Unity.
Check out my website for more resources: mwesterstudios.com
Here is the 3rd Person Fly Mode that I got the humanoid character from:
assetstore.unity.com/packages/templates/systems/3rd-person-controller-fly-mode-28647
Download free characters and animations from Mixamo here:
www.mixamo.com/#/
Переглядів: 18 596

Відео

Direction Based Combat System || Unity 2020 Tutorial
Переглядів 9 тис.4 роки тому
In this video I quickly explain how to set up a directionally-based combat system as seen in popular video games like the Elder Scrolls: Arena, the Mount and Blade series, For Honor, and War of the Roses. The FPS arms (including several animations), Sci Fi Sword, and script used in this video are available for free on my website: www.mwesterstudios.com/ If you have a request for future tutorial...
Showcase 2020 | What I Have Learned in 5 Years of Technology Development
Переглядів 1574 роки тому
In this video I showcase several of my projects (both past and present) from the past five years. Five years ago I began to practice game development, and since then have also learned 3D modelling, animation (2D/3D), cinematography, programming, as well as many other useful skills. For more information on my team's current project, please visit my website: www.mwesterstudios.com/
Low Poly Japanese Bridge || Blender Speed Model
Переглядів 2544 роки тому
This quick video is to show my workflow when creating quick low poly models. Hope you enjoy! If you want access to the models made, leave a comment.
Create Toggles! | Unity 2020 Tutorial
Переглядів 1804 роки тому
In this tutorial I explain how to create a simple toggle(on/off) system with c# in Unity! If you have questions or ideas for future tutorials, be sure to leave a comment down below! Remember that if you want to download the script(or other FREE models for commercial use) you can do so from my website: mwesterstudios.com
Make Unity Assets With Blender! || Blender 2.8 to Unity 2020 Tutorial
Переглядів 2,8 тис.4 роки тому
In this video I explain how to create simple assets for your Unity game using blender 2.8! If you want to see more blender to Unity tutorials make sure to leave a comment down below!! You can download the TV (along with some other FREE assets) from my website: mwesterstudios.com Download blender for FREE here: blender.org
How to create a Multiple-Response Dialogue System | Unity 2020 Tutorial
Переглядів 30 тис.4 роки тому
In this video I will show how to create a simple multiple-response dialogue system for your game! This system is great in that it can be easily customized, and can be modified to work with quests, audio, and even become a book-reading system as seen in Skyrim! As mentioned in the video, the scripts can be downloaded from my website: www.mwesterstudios.com/ Also, here is a link to the video by B...
Tharn Official Trailer 1
Переглядів 3876 років тому
This is the full trailer video for Tharn, which is a difficult puzzle game coming soon to STEAM.
Tharn Official Teaser 2
Переглядів 2506 років тому
This is the official second teaser video for Tharn, soon to be available for Steam.
Tharn Official Teaser 1
Переглядів 1586 років тому
Tharn has finally been submitted for review on the Steam platform! Here is the first teaser for it. Enjoy figuring out the purpose behind this game!
EASILY Pick up and Throw Objects | Unity 2018 Tutorial
Переглядів 52 тис.6 років тому
In this updated tutorial, I go over the issues that the last video on this subject had, and we create a brand new system perfect for any game that involves picking up game objects! I also teach how to create a throw system that is easily modified, as well as implementing collisions and distance vectors.
2D Spiderman Game | Made with Unity
Переглядів 7 тис.6 років тому
This is a small prototype 2D game that I made with Unity, which is inspired by the web slinging Spiderman. Will probably be coming out on the Google Play store shortly for Android devices. Also, be sure to check out my most recent Android App: Blob Jumper!
Tharn Gameplay | Unity Puzzle Game
Переглядів 4,4 тис.6 років тому
Tharn is a small project I have been working on, and this is a short gameplay video to showcase what I have gotten done with it so far. The game is unfinished, and so expect a few bugs in the video. Players will take on the role of Dan, a loving and law abiding citizen. After some disturbances in his neighborhood, Dan went to his local community's T.H.A.R.N. Facility (Tactical Human Assisted Re...
Medieval Knight made in Blender
Переглядів 8936 років тому
These are several images of a medieval knight that I modeled with Blender. The images show the process of the modeling from the low poly beginning to the photo-realistic finished product. Credit for music: Renaissance by Audionautix is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/by/4.0/) Artist: audionautix.com/ Video Game Soldiers by Twin Musicom is lice...
Everything Wrong With Humanity in Six Seconds
Переглядів 4306 років тому
Everything Wrong With Humanity in Six Seconds
SPAAAAACE! | Unity Point and Click Demo
Переглядів 3147 років тому
SPAAAAACE! | Unity Point and Click Demo
Triplicata Update Trailer
Переглядів 2037 років тому
Triplicata Update Trailer
Blender Head Sculpting Time Lapse
Переглядів 2427 років тому
Blender Head Sculpting Time Lapse
First Person Puzzle Demo | Unity 2017
Переглядів 5 тис.7 років тому
First Person Puzzle Demo | Unity 2017
Pick up and Move Objects | Unity 2017 Tutorial
Переглядів 30 тис.7 років тому
Pick up and Move Objects | Unity 2017 Tutorial
Unity 2017 Game: Triplicata
Переглядів 1137 років тому
Unity 2017 Game: Triplicata
Triplicata Game Trailer (Unity 5)
Переглядів 6737 років тому
Triplicata Game Trailer (Unity 5)

КОМЕНТАРІ

  • @toasty_boye380
    @toasty_boye380 15 днів тому

    using System.Collections; using System.Collections.Generic; using System.Globalization; using System.IO.Pipes; using UnityEngine; using UnityEngine.UI; public class DialogueManager : MonoBehaviour { public NPC npc; bool isTalking = false; float distance; float curResponseTracker = 0; public GameObject player; public GameObject dialogueUI; public Text npcName; public Text npcDialogueBox; public Text playerResponse; // Start is called before the first frame update void Start() { dialogueUI.SetActive(false); } void OnMouseOver() { distance = Vector3.Distance(player.transform.position, this.transform.position); if(distance <= 2.5f) { if(Input.GetAxis("Mouse ScrollWheel") < 0f) { curResponseTracker++; if (curResponseTracker >= npc.playerDialogue.Length - 1) { curResponseTracker = npc.playerDialogue.Length - 1; } } else if(Input.GetAxis("Mouse ScrollWheel") > 0f) { curResponseTracker--; if(curResponseTracker < 0) { curResponseTracker = 0; } } //trigger dialogue if(Input.GetKeyDown(KeyCode.E) && isTalking==false) { StartConversation(); Debug.Log(); } else if(Input.GetKeyDown(KeyCode.E) && isTalking == true) { EndDialogue(); } if(curResponseTracker == 0 && npc.playerDialogue.Length >= 0) { playerResponse.text = npc.playerDialogue[0]; if(Input.GetKeyDown(KeyCode.Return)) { npcDialogueBox.text = npc.dialogue[1]; } } else if(curResponseTracker == 1 && npc.playerDialogue.Length >= 1) { playerResponse.text = npc.playerDialogue[1]; if(Input.GetKeyDown(KeyCode.Return)) { npcDialogueBox.text = npc.dialogue[2]; } } else if (curResponseTracker == 2 && npc.playerDialogue.Length >= 2) { playerResponse.text = npc.playerDialogue[2]; if (Input.GetKeyDown(KeyCode.Return)) { npcDialogueBox.text = npc.dialogue[3]; } } } } void StartConversation() { isTalking = true; curResponseTracker = 0; dialogueUI.SetActive(true); npcName.text = npc.name; npcDialogueBox.text = npc.dialogue[0]; } void EndDialogue() { isTalking = false; dialogueUI.SetActive(false); } } Np

  • @coucoul38
    @coucoul38 2 місяці тому

    Thank you, this was very helpfull. I thought it would be much harder but turns out I wasnt tackling this problem the right way

  • @AmazingMonica-l1o
    @AmazingMonica-l1o 5 місяців тому

    Here's my code: using System.Collections; using System.Collections.Generic; using UnityEngine; using System.IO.Pipes; using UnityEngine.UI; using TMPro; public class DialogueManagerA : MonoBehaviour { public NPC npc; bool isTalking = false; float distance; public float curResponseTracker = 0; public GameObject player; public GameObject dialogueUI; public TMP_Text npcName; public TMP_Text npcDialogueBox; public TMP_Text playerResponse; // Start is called before the first frame update void Start() { dialogueUI.SetActive(false); } // Update is called once per frame void OnMouseOver() { distance = Vector3.Distance(player.transform.position,this.transform.position); if(distance <= 2.5f) { if(Input.GetAxis("Mouse ScrollWheel") < 0f) { Debug.Log("!!!"); curResponseTracker++; if(curResponseTracker >= npc.playerDialogue.Length -1 ) { curResponseTracker = npc.playerDialogue.Length - 1; } } else if(Input.GetAxis("Mouse ScrollWheel") > 0f) { Debug.Log("!!!11"); curResponseTracker--; if(curResponseTracker <0) { curResponseTracker = 0; } } //trigger dialogue if(Input.GetKeyDown(KeyCode.E) && isTalking == false ) { StartConversation(); } else if(Input.GetKeyDown(KeyCode.E) && isTalking == true) { EndDialogue(); } if(curResponseTracker == 0 && npc.playerDialogue.Length >= 0) { playerResponse.text = npc.playerDialogue[0]; if(Input.GetKeyDown(KeyCode.F)) { npcDialogueBox.text = npc.dialogue[1]; } else if(curResponseTracker == 1 && npc.playerDialogue.Length >= 1) { playerResponse.text = npc.playerDialogue[1]; if(Input.GetKeyDown(KeyCode.F)) { npcDialogueBox.text = npc.dialogue[2]; } } else if(curResponseTracker == 2 && npc.playerDialogue.Length >= 2) { playerResponse.text = npc.playerDialogue[2]; if(Input.GetKeyDown(KeyCode.F)) { npcDialogueBox.text = npc.dialogue[3]; } } } } } void StartConversation() { isTalking = true; curResponseTracker = 0; dialogueUI.SetActive(true); npcName.text = npc.name; npcDialogueBox.text = npc.dialogue[0]; } void EndDialogue() { isTalking = false; dialogueUI.SetActive(false); } }

    • @AmazingMonica-l1o
      @AmazingMonica-l1o 5 місяців тому

      I Debug the MouseScroolWheel.It was working. But when it comes to curResponseTracker.Nothing happen

  • @AmazingMonica-l1o
    @AmazingMonica-l1o 5 місяців тому

    Can you explain waht is curResponseTracker? I think this one doesn't work here.I don't know how to check it

  • @rabidcheesemonkey1092
    @rabidcheesemonkey1092 6 місяців тому

    You may wanna look at your website. My AV blocked a threat

    • @mattwester9093
      @mattwester9093 6 місяців тому

      Sorry but the domain no longer belongs to me, don't use the website anymore please

    • @rabidcheesemonkey1092
      @rabidcheesemonkey1092 6 місяців тому

      @@mattwester9093 I won't. However I thought to give you a heads up if you hadn't told your audience about it prior to me finding out.

  • @Ariel-uo7le
    @Ariel-uo7le 9 місяців тому

    thank you so muchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @windy-autumn
    @windy-autumn 9 місяців тому

    Great tutorial! Very understandable! Thank you so much!! Keep it up! ☺

  • @shazeerrra
    @shazeerrra 10 місяців тому

    It didnt work on me when i press E 😭

  • @mrscarytruth-ct9cx
    @mrscarytruth-ct9cx 10 місяців тому

    the link is broken its sending me to a page that wants to show puch notifications

    • @mattwester9093
      @mattwester9093 10 місяців тому

      I no longer own the domain, that page isn't mine, sorry

  • @IJH-Music
    @IJH-Music 11 місяців тому

    I wasn't looking for this, but this helped me finish my For Honor "Art of Combat" THANKS!! (:

  • @leerc7721
    @leerc7721 11 місяців тому

    How is the player rotating when you move? my character does not face the target

    • @ElGabroVero
      @ElGabroVero 10 місяців тому

      Hi! I had the same problem too! There is a variable to set sotpping distance! Try with 0.5 for example

  • @leerc7721
    @leerc7721 11 місяців тому

    The animation does not change from idle to walking when I move the character :(

    • @leerc7721
      @leerc7721 11 місяців тому

      actually my mistake, I had the wrong animator selected on the script component, its working for me now. Thx for the vid :)

  • @UtlimateJeff64
    @UtlimateJeff64 Рік тому

    Hey I'm trying to implement this in a game I am working on (I am very new coding) and all of the code and guide works completely fine until the "npcDialogueBox.text = npc.dialogue[0];" line of code, specifically the section after the = sign "npc.dialogue[0];" And I'm not really sure as to why

  • @theactualrealpikachufans2018

    You can also make your own assets for VRChat as well with Blender, right?

  • @hunter7777
    @hunter7777 Рік тому

    Hi & great video. When I try to go to your website, it gives me a bitdefender error (not sure if it is real or not). That was in Chrome. When I tried it in Firefox, it says that the domain doesn't exist.

    • @mattwester9093
      @mattwester9093 Рік тому

      Yes sorry, there wasn't enough traffic to the site for me to justify keeping it up. I do plan on self hosting a site in the future, but am still in the process of deciding on a rebranded domain and setting up my servers If you need anything from the videos I can share a link to the google drive file I keep them in, so just let me know :)

  • @Kehmicle
    @Kehmicle Рік тому

    this was very useful however each dialog option is always available and only has one panel of text for each. it would be nice to have multiple text panels per option and not be able to access any text panel at any time.

    • @mattwester9093
      @mattwester9093 Рік тому

      Happy this helped! For more dialogue panels you can try replacing them with additional queues in the code, each containing their own text panels

  • @HeavytensionDanganronpa
    @HeavytensionDanganronpa Рік тому

    hey, so I have a question! For some reason, I can't add the textmeshpro assets into the npc, npc dialogue box, and player response options at 18:53. I'm not sure why, so any help is appreciated! Here is my script if you need it. using System.Collections; using System.Collections.Generic; using System.IO.Pipes; using UnityEngine; using UnityEngine.UI; public class Maneger : MonoBehaviour { public NPC npc; bool isTalking = false; float distance; float curResponseTracker = 0; public GameObject player; public GameObject dialogueUI; public Text npcName; public Text npcDialogueBox; public Text playerResponse; // Start is called before the first frame update void Start() { dialogueUI.SetActive(false); } void OnMouseOver( ) { distance = Vector3.Distance(player.transform.position, this.transform.position); if(distance <= 2.5f) { //trigger dialogue if (Input.GetKeyDown(KeyCode.E) && isTalking == false) { StartConversation(); } else if (Input.GetKeyDown(KeyCode.E) && isTalking == true); { EndDialogue(); } } } void StartConversation() { isTalking = true; curResponseTracker = 0; dialogueUI.SetActive(true); npcName.text = npc.name; npcDialogueBox.text = npc.dialogue[0]; } void EndDialogue() { isTalking = false; dialogueUI.SetActive(false); } }

    • @ZeydenMB
      @ZeydenMB Рік тому

      Just choose text instead of text mes pro it's in UI > Legacy > Text

  • @pocoace5415
    @pocoace5415 Рік тому

    my UI doesnt have Text only TextMeshpro but when i try to drag the TextMeshpro to dialogManager i cant drag it

    • @mattwester9093
      @mattwester9093 Рік тому

      If you paste your code I can take a look at it

    • @pocoace5415
      @pocoace5415 Рік тому

      @@mattwester9093 its already good now i just need to change the text to textmeshpro in c#

    • @totallyunusedusername
      @totallyunusedusername Рік тому

      i think the Text is in the Legacy option

    • @pocoace5415
      @pocoace5415 Рік тому

      @@totallyunusedusername i'll try

  • @henrylzmaucr
    @henrylzmaucr Рік тому

    im trying to pick it up using ray casting, since its obvious this doesnt work by itself, the object needs to know the player wants to interact with it but im having a lot of trouble with connecting the ray casting with this moveobject class

  • @cyber.punch.studios
    @cyber.punch.studios Рік тому

    Hello, why does the player continue to play the walking animation for half a second when reaching the destination?

    • @olwesTayerd
      @olwesTayerd Рік тому

      hello, do you have a fix for this?

  • @chadm6777
    @chadm6777 Рік тому

    Wonderful!

  • @ranina.ultradream30
    @ranina.ultradream30 Рік тому

    Thank you for the tutorial. I have a couple of notes to improve the pedagogy: I know you're fluent in programming, but the people who are watching the tutorial might not understand each line of code and the reason why you used them. For instance, you started the DialogueManager script with "public NPC npc;" or "bool isTalking = false;" and the person who's watching it might wonder why. I know you explained it later on, but the viewer become disengaged at the moment. This is also the case for a whole script like the DialogueManager. Before making a script, I want to know the logic behind it and WHY we need it.

  • @hophuoctin1669
    @hophuoctin1669 Рік тому

    Why does my character when approaching the destination run around it?

  • @leornoc608
    @leornoc608 Рік тому

    Didn't work for me, code was fine but the fing orb did nothing to make my char move. Really well explained however, shame to see there's not been anymore videos.

    • @TheCrownLP
      @TheCrownLP Рік тому

      deactivate the collider of the capsule that workt for me

  • @bluecrazyclown._.9865
    @bluecrazyclown._.9865 Рік тому

    For some reason I don't go to the right website when clicking the link. Could someone comment the code bellow pls? Ty for the video!

  • @emilieheskey5942
    @emilieheskey5942 Рік тому

    Matt please repost the tutorial for creating the puzzles

    • @mattwester9093
      @mattwester9093 Рік тому

      Sorry, but when I filmed the video I accidentally left out an important part while making the scripts. I took it down a few years ago and don't have it anymore

    • @emilieheskey5942
      @emilieheskey5942 Рік тому

      @@mattwester9093 No worries, do you know what tutorials/assets/documentation you used in order to make them or anything to look at to help recreate these puzzles?

    • @mattwester9093
      @mattwester9093 Рік тому

      @@emilieheskey5942 it was done from scratch, but essentially just used a combination of my tutorial on carrying objects with a lot of toggles.

  • @realmcraftchronicles
    @realmcraftchronicles Рік тому

    Thank you for this! So, would you really want the throw and pickup to be in the same class? Or would they be separate classes?

  • @Mitzterbg
    @Mitzterbg Рік тому

    Great video! The link for the downloads appears to be dead though

    • @mattwester9093
      @mattwester9093 Рік тому

      Yes, sorry about that. Due to little traffic I took down the website

    • @ZeydenMB
      @ZeydenMB Рік тому

      @@mattwester9093 Any way we can get the download link back ? This is exactly what i searched but now sadly i can't download it..

  • @swiftflare9674
    @swiftflare9674 Рік тому

    The default text is textMeshPro what is the code to call it in the script ?

  • @seymaple
    @seymaple Рік тому

    Hey awesome video, it's been a while since you uploaded, but I can't get past two dialogue changes in the player dialogue. I have four different responses, but it only does two. Any thoughts?

    • @mattwester9093
      @mattwester9093 Рік тому

      Could you post your code? I'll take a look when I get a chance

    • @seymaple
      @seymaple Рік тому

      @@mattwester9093 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DialogueManger : MonoBehaviour { public NPC npc; bool isTalking = false; float distance; float curResponseTracker = 0; public GameObject player; public GameObject dialogueUI; public Text npcName; public Text npcDialogueBox; public Text playerResponse; // Start is called before the first frame update void Start() { dialogueUI.SetActive(false); } void OnMouseOver() { distance = Vector3.Distance(player.transform.position, this.transform.position); if(distance <=2.5f) { if(Input.GetAxis("Mouse ScrollWheel") < 0f) { curResponseTracker++; if (curResponseTracker >= npc.playerDialogue.Length - 1) { curResponseTracker = npc.playerDialogue.Length - 1; } } else if(Input.GetAxis("Mouse ScrollWheel") > 0f) { curResponseTracker--; if(curResponseTracker < 0) { curResponseTracker = 0; } } //trigger dialogue if(Input.GetKeyDown(KeyCode.E) && isTalking == false) { StartConversation(); } else if(Input.GetKeyDown(KeyCode.E) && isTalking == true) { EndDialogue(); } if(curResponseTracker == 0 && npc.playerDialogue.Length >= 0) { playerResponse.text = npc.playerDialogue[0]; if(Input.GetMouseButton(0)) { npcDialogueBox.text = npc.dialogue[1]; } } else if( curResponseTracker == 1 && npc.playerDialogue.Length >= 1) { playerResponse.text = npc.playerDialogue[1]; if(Input.GetMouseButton(0)) { npcDialogueBox.text = npc.dialogue[2]; } } } void StartConversation() { isTalking = true; curResponseTracker = 0; dialogueUI.SetActive(true); npcName.text = npc.name; npcDialogueBox.text = npc.dialogue[0]; } void EndDialogue() { isTalking = false; dialogueUI.SetActive(false); } } }

    • @seymaple
      @seymaple Рік тому

      @@mattwester9093 thanks btw, as for the other script (NPC) it's: using System.Collections; using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(fileName = "NPC file", menuName = "NPC Files Archive")] public class NPC : ScriptableObject { public string name; [TextArea(3,15)] public string[] dialogue; [TextArea(3, 15)] public string[] playerDialogue; }

    • @seymaple
      @seymaple Рік тому

      @@mattwester9093 any thoughts?

    • @mattwester9093
      @mattwester9093 Рік тому

      @@seymaple I just read over your code and it looks fine. I'm guessing there is an issue on the editor side. Possibly even with how you set up the UI?

  • @davepolo7407
    @davepolo7407 Рік тому

    the website isn't working bruh

  • @darklordxark
    @darklordxark Рік тому

    Awesome video 👍

  • @magoblancoel
    @magoblancoel 2 роки тому

    Thanks!!!!!!!!!!!

  • @faradraissa7805
    @faradraissa7805 2 роки тому

    BTW Great video

  • @monsterblood4209
    @monsterblood4209 2 роки тому

    script doesn't work anymore, don't bother

    • @mattwester9093
      @mattwester9093 2 роки тому

      As far as I know this script still works fine. Could you post any errors you have?

  • @micol04
    @micol04 2 роки тому

    PLEASE someone help. when my player gets on the target destination sphere, it begins to loop between walking and stopping animation. anyone knows why?

    • @mattwester9093
      @mattwester9093 2 роки тому

      I would guess that the issue lies in your animator controller, possibly the way you transition between the two animations? If not that, double check that there is no collision on the target destination sphere preventing the player from fully reaching the destination

    • @stephenhenderson7546
      @stephenhenderson7546 Рік тому

      @@mattwester9093 i have same problem I even completely removed the Sphere

    • @cademarsh5097
      @cademarsh5097 Рік тому

      Not sure if you ever fixed this issue, but I would make sure on your Animator that the "Apply Root Motion" is not check marked.

    • @micol04
      @micol04 Рік тому

      @@cademarsh5097 I unchecked it but abandoned the project anyway for another. Thanks

  • @friendlyyakuza2373
    @friendlyyakuza2373 2 роки тому

    This tutorial is perfect....is there an easy way to add voice to dialogue when talking it'd be really helpful

  • @micol04
    @micol04 2 роки тому

    please help. everything works. but when player reaches the red sphere. i checked my animation and player is not going back to idle instead the animation is moving still between idle and walking

    • @ElGabroVero
      @ElGabroVero 10 місяців тому

      Hi! Im new to game making and im following along this video. Did you try to set stopping distance to some value?

    • @micol04
      @micol04 10 місяців тому

      @@ElGabroVero yes. I ended the project as it couldn’t be fixed. But thanks for your response

    • @ElGabroVero
      @ElGabroVero 10 місяців тому

      @@micol04 Sorry to hear about that :( wish you luck for the future, man!

  • @Aaron-pb2bf
    @Aaron-pb2bf 2 роки тому

    is there a way to make it easier to get dialogue. I am spamming e for it to work

    • @Aaron-pb2bf
      @Aaron-pb2bf 2 роки тому

      i'll post my script below

    • @Aaron-pb2bf
      @Aaron-pb2bf 2 роки тому

      using System.Collections; using System.Collections.Generic; using System.IO.Pipes; using UnityEngine; using UnityEngine.UI; public class DialogueManager : MonoBehaviour { public NPC npc; bool isTalking = false; float distance; float curResponseTracker = 0; public GameObject player; public GameObject dialogueUI; public Text npcName; public Text npcDialogueBox; public Text playerResponse; // Start is called before the first frame update void Start() { dialogueUI.SetActive(false); } void OnMouseOver() { distance = Vector3.Distance(player.transform.position, this.transform.position); if(distance <= 2.5f) { if(Input.GetAxis("Mouse ScrollWheel") < 0f) { curResponseTracker++; if(curResponseTracker >= npc.playerDialogue.Length -1) { curResponseTracker = npc.playerDialogue.Length -1; } } else if (Input.GetAxis("Mouse ScrollWheel") > 0f) { curResponseTracker--; if(curResponseTracker <0) { curResponseTracker = 0; } } //trigger dialogue if(Input.GetKeyDown(KeyCode.E) && isTalking==false) { StartConversation(); } else if(Input.GetKeyDown(KeyCode.E) && isTalking == true) { EndDialogue(); } if(curResponseTracker == 0 && npc.playerDialogue.Length >= 0) { playerResponse.text = npc.playerDialogue[0]; if(Input.GetKeyDown(KeyCode.Return)) { npcDialogueBox.text = npc.dialogue[1]; } } else if(curResponseTracker == 1 && npc.playerDialogue.Length >=1 ) { playerResponse.text = npc.playerDialogue[1]; if(Input.GetKeyDown(KeyCode.Return)) { npcDialogueBox.text =npc.dialogue[2]; } } else if(curResponseTracker == 2 && npc.playerDialogue.Length >=2 ) { playerResponse.text = npc.playerDialogue[2]; if(Input.GetKeyDown(KeyCode.Return)) { npcDialogueBox.text =npc.dialogue[3]; } } } void StartConversation() { isTalking = true; curResponseTracker = 0; dialogueUI.SetActive(true); npcName.text = npc.name; npcDialogueBox.text = npc.dialogue[0]; } void EndDialogue() { isTalking = false; dialogueUI.SetActive(false); } } }

  • @itseddo
    @itseddo 2 роки тому

    thank you so much, im working on a point and click for my course and I couldnt figure this out thank you jesus christ i needed this

  • @LeetardPlays
    @LeetardPlays 2 роки тому

    Any idea as to why the player won't move? I'm kinda goosed atm. I'm no programmer or Unity fanatic

    • @emilythebaptist
      @emilythebaptist 11 місяців тому

      hey buddy

    • @LeetardPlays
      @LeetardPlays 11 місяців тому

      Ah. I see we meet again​@@emilythebaptist

    • @emilythebaptist
      @emilythebaptist 11 місяців тому

      @@LeetardPlays Just got it to work! hope it goes well for u

    • @LeetardPlays
      @LeetardPlays 11 місяців тому

      @@emilythebaptistI disliked this comment

  • @carsextendedwarranty
    @carsextendedwarranty 2 роки тому

    The mechanics look good, but, you should add some polish, as the UI looks like something straight out of a flash game.

  • @NarutoUzumaki-gj9zn
    @NarutoUzumaki-gj9zn 2 роки тому

    i found a solution for the panel not showing up when u press E the solution for me was the display channel i use display2 and it was set for display1

  • @RodnnySniperLyfe
    @RodnnySniperLyfe 2 роки тому

    Any Reasons Why when the character reach his destination it will start walking in circles around the sphere?

    • @pebbu7435
      @pebbu7435 2 роки тому

      I'm guessing the sphere has a collider that stops the character from actually reaching the destination, so he walks circles around

    • @NemesisIrae
      @NemesisIrae 11 місяців тому

      I had the same issue. I think it depends on the walking animation if the velocity of the agent can drop to zero (and the animation goes back to idle). I used a float variable in the control script as a minimum distance threshold and it works fine now. [SerializeField] float minDistanceToTarget = 0.1f; // in Update() instead of checking the velocity: if (player.remainingDistance > minDistanceToTarget) { animator.SetBool("isWalking", true); } else { animator.SetBool("isWalking", false); }

  • @fifticiodaddy
    @fifticiodaddy 2 роки тому

    hello bro it appears to me that I could do in this case. (The referenced script on this behaviour (Game Object "npc")is missing!)

  • @rbanister100
    @rbanister100 2 роки тому

    When making video's, you need to make sure the INS (the INSERT KEY), is NOT pressed, to get rid of the BLOCK CURSOR. in Visual Studio.

  • @raelroque5595
    @raelroque5595 2 роки тому

    this scroll method its what game in the world use this system? none game that i have played has this system like this, all games that i play appear boxes to chose as answer its mutch better

    • @mattwester9093
      @mattwester9093 2 роки тому

      Feel free to use boxes if that's your preference. I chose this method because I like it, the logic is the same regardless

  • @grzine9855
    @grzine9855 2 роки тому

    hey i had the same problem as primentay and Yaya here is my script thanks! could you copy my script and correct it? back that would mean the world to me using System.Collections; using System.Collections.Generic; using System.IO.Pipes; using UnityEngine; using UnityEngine.UI; public class Maneger : MonoBehaviour { public NPC npc; bool isTalking = false; float distance; float curResponseTracker = 0; public GameObject player; public GameObject dialogueUI; public Text npcName; public Text npcDialogueBox; public Text playerResponse; // Start is called before the first frame update void Start() { dialogueUI.SetActive(false); } void OnMouseOver( ) { distance = Vector3.Distance(player.transform.position, this.transform.position); if(distance <= 2.5f) { //trigger dialogue if (Input.GetKeyDown(KeyCode.E) && isTalking == false) { StartConversation(); } else if (Input.GetKeyDown(KeyCode.E) && isTalking == true); { EndDialogue(); } } } void StartConversation() { isTalking = true; curResponseTracker = 0; dialogueUI.SetActive(true); npcName.text = npc.name; npcDialogueBox.text = npc.dialogue[0]; } void EndDialogue() { isTalking = false; dialogueUI.SetActive(false); } }

  • @lukakunovic7661
    @lukakunovic7661 2 роки тому

    You are nothing short of a god walking amongst regular men. This was SO USEFULL AND EASY TO FOLLOW. great video

  • @duck5547
    @duck5547 2 роки тому

    @Matt Wester Can you please make a video where u have options for the player to select instead of pre-written dialogue.