Player Stats With UI - FPS Game With Unity & Blender

Поділитися
Вставка
  • Опубліковано 10 сер 2021
  • PLAYER STATS WITH UI
    In the ninth episode of the FPS Game remake I show you how to add health to the player and UI.
    Feel free to donate if you are rich :D
    streamlabs.com/singlesaplingg...
    Thanks to: Robin Brown, Tom Taborovski and Samin Grahic for their support on Patreon.
    Discord Server - / discord
    Patreon - / singlesapling
    Twitter - / singlesaplingg
    Reddit - / singlesaplinggames
    Instagram - singlesapli...
    DeviantArt - singlesaplinggames.deviantart...
    Facebook - / single-sapling-games-2...
    Itch.IO - single-sapling-games.itch.io+
    Tumblr - / singlesapling
    UA-cam - / @singlesapling
    --Programs--
    Engine: Unity - unity3d.com/
    Modeling: Blender - www.blender.org/
    2D Editing: Krita - krita.org/en/
    Programing: Visual Studio - visualstudio.microsoft.com/
    Organization: Trello - trello.com/
    --Outro Music--
    Song: Horizon (feat. Tylah Rose) - Loreno Mayer & Haesën
    Music provided by Ninety9Lives
    Video: • Loreno Mayer & Haesën ...
    Download: 99l.tv/88HorizonYU
    --TAGS--
    script make game for free 2020 development dev unity blender program tutorial guide new hd twitter youtube developer indie design art cool easy quick fast fps first person shooter game gaming how to intro introduction learn teach learning teaching livestream live stream indiegamedev indiegame indie unity2020 blender3d unity3d devlog
  • Ігри

КОМЕНТАРІ • 36

  • @yozegami
    @yozegami Рік тому +5

    Man, you're a lifesaver. First tutorial series I've tried where everything just works. Thank you!

  • @theeyeofmango
    @theeyeofmango Рік тому +10

    In order to use TextMeshPro under Player HUD script use the following
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;
    using TMPro;
    public class PlayerHUD : MonoBehaviour
    {
    [SerializeField] private TextMeshProUGUI currentHealthText;
    [SerializeField] private TextMeshProUGUI maxHealthText;
    public void UpdateHealth(int currentHealth, int maxHealth)
    {
    currentHealthText.text = currentHealth.ToString();
    maxHealthText.text = maxHealth.ToString();
    }
    }

    • @arcosic
      @arcosic Рік тому +1

      Thanks! I was just looking for this :D

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

      Thanks, you just saved my grade! (My project is due in 30 min lol)

  • @leonardokunde
    @leonardokunde 2 роки тому +2

    Great job! continue the series please!

  • @michaelalexis5776
    @michaelalexis5776 2 роки тому +2

    Thank you for sharing your knowledge, your content is very good, I was looking for this series of videos :3

  • @user-ls9ch8zq1q
    @user-ls9ch8zq1q 6 місяців тому

    Really love it

  • @BearCavalryWasTaken
    @BearCavalryWasTaken Рік тому +3

    encase you can't get the text to change because you're using Text Mesh pro you can fix it by adding
    Using TMPro;
    and then do Private TextMeshProUGUI (insert name here) instead of just Text
    and using (variablename).SetText((Variablename).ToString()); instead of (variablename).text = (variablename).ToString();

  • @PeacefulChaos8700
    @PeacefulChaos8700 4 місяці тому

    Single Sapling Games am I able to use your gun models and other stuff that are a bit hard for me to model as I'm kinda new modeling stuff in blender in my game that I'm wanting to sale as long as I credit you?

  • @user-ug2xp9gc2f
    @user-ug2xp9gc2f 2 роки тому +6

    some tips:
    Use TextMeshPro not Text.
    In information UI elements disable Raycast Target.
    In Text not use Rich Text.
    For changes HUD values use not direct link but delegates or Unity events

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

      I had the same problem I think its
      using TMPro;
      using system;
      then
      private TMP_Text amount;

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

    Your videos are awesome 🔥🔥 I really loved it!!!!You should try making a God War machanism!!! That would be great!!🙌🏻🙌🏻🙌🏻

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

    yes can u make Inventory tutorial, bcuz i dont know how to make it!

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

    A content machine

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

    15:18 public override doesnt work for me. Why?

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

    Hello, your videos really awesome. But can you or someone help me? my current health still 100 when i press 'X' Button to check TakeDamage

  • @ghostxtempzz115
    @ghostxtempzz115 2 роки тому +2

    I would love to know how to add a progress bar onto this like Call Of Duty: Cold War does with the player health in zombies as I'm trying to make a zombies style game.

  • @squirrel42069
    @squirrel42069 2 роки тому +1

    hey @Single Sapling Games, I wrote this code:
    public override void CheckHealth()
    {
    base.CheckHealth();
    hud.UpdateHealth(health, maxHealth);
    }
    but it kept saying "no suitable method found to override"
    Do you know how to fix it?

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

      You also have to have it marked as a virtual void in the parent script

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

    I have a problem that my health and max health does not get show in the ui

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

      Probably something wrong in your script

  • @squirrel42069
    @squirrel42069 2 роки тому +1

    next idea, can you teach me how to add zombies???

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

    he said a bad word!!!!! (Great tutorial)
    p.s - Do u know what this error mean..... 'PlayerHUD' does not contain a definition for 'UpdateHealth' and no accessible extension method 'UpdateHealth' accepting a first argument of type 'PlayerHUD' could be found

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

      Same did you figure it out??

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

      I figured it out btw
      in "PlayerHUD"
      the line
      public void UpdateHealth(int currentHealth, int maxHealth)
      needs to have a space beetween "UpdateHealth" and "(int currentHealth, int maxHealth)"
      should look like this
      public void UpdateHealth (int currentHealth, int maxHealth)

  • @Demon.Immortalis
    @Demon.Immortalis Рік тому

    For the ones using TMPro use this script:
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;
    using TMPro;
    public class PlayerStats : CharacterStats
    {
    [SerializeField] private TMP_Text currentHealthText;
    [SerializeField] private TMP_Text maxHealthText;
    public void UpdateHealth(int currentHealth, int maxHealth)
    {
    currentHealthText.text = currentHealth.ToString();
    maxHealthText.text = maxHealth.ToString();
    }
    }