Player Stat system
-
- Posts: 78
- Joined: Wed Sep 25, 2024 11:26 pm
- Location: New York City
- Contact:
Player Stat system
Is it possible to set up a player stat system that can be displayed on screen? Using Lua?
Re: Player Stat system
Yes, others have done that before. One person even used a conversation with a custom dialogue UI to act like a stat point allocation menu, although I think it would be more straightforward to write a short C# script to do that.
You can store the stats in Lua, access them in C# using the DialogueLua class, and even use [var=variable] tags in text such as:
You can store the stats in Lua, access them in C# using the DialogueLua class, and even use [var=variable] tags in text such as:
Code: Select all
// Variables "HP" and "MaxHP" are player stats. Show them in this UI:
textMeshProHP.text = FormattedText.ParseCode("[var=HP] / [var=MaxHP]");
-
- Posts: 78
- Joined: Wed Sep 25, 2024 11:26 pm
- Location: New York City
- Contact:
Re: Player Stat system
Thank you so much!