Hey i downloadedd your scripts and when i go to put them into the game it says cant add script. The script needs to derive from monobehaviour
wait so how do you get this to work sense i have the scripts i bought from you and it wont let me add them to anything any object or anything and it doesnt show up so what do i have to do to make what you show at the beginning of this video work in my game???
It is not meant to be attached to any object in game.
Assets/Scripts/Character Classes/NewBehaviourScript.cs(7,16): error CS1519: Unexpected symbol `public' in class, struct, or interface member declaration
Please, can you tell me whats is the error?
public class BaseStat {
private int _baseValue; //the bae valie of this stat
private int _buffValue; //the amount of th buff to this stat
private int _expToLevel; //the total amount of exp needed to raise this skill
private float _levelModifier //the modifier applied to the exp needed to raise the skill
public BaseStat() {
_baseValue = 0;
_buffValue = 0;
_levelModifier = 1.1f;
_expToLevel = 100;
}
//Basic Setters and Getters
public int BaseValue {
get{ return _baseValue; }
set{ _baseValue = value; }
}
private int BuffValue {
get{ return _buffValue; }
set{ _buffValue = value; }
}
private int ExpToLevel {
get{ return _expToLevel; }
set{ _expToLevel = value; }
}
private float LevelModifier {
get{ return _levelModifier; }
set{ _levelModifier = value; }
}
private int CalculateExpToLevel() {
return (int)(_expToLevel * _levelModifier);
}
public void LevelUp() {
_expToLevel = CalculateExpToLevel ();
_baseValue++;
}
public int AdjustedValue() {
return _baseValue + _buffValue
; }
}
You forgot your cast between the arrows :-)
public class BaseStat {
private int _baseValue; //the bae valie of this stat
private int _buffValue; //the amount of th buff to this stat
private int _expToLevel; //the total amount of exp needed to raise this skill
private float _levelModifier >>>>>> ; <<<<<<< //the modifier applied to the exp needed to raise the skill
Umm how r u using floats and integers together like that... because usually you cant multiply at INT by a FLOAT i get errors stating "Error 1 Cannot implicitly convert type 'float' to 'int'. An explicit conversion exists (are you missing a cast?)"
check out the next vid for your fix.
I'm trying to use exptolevel=exptolevel(expancetolevel+1)/2 for the experience to level modifier. So if I were using single digits it would be 1,3,6,10,15,21 ect... But I don't know how to represent that in C# and guidance or suggestion will be helpful and thank you in advance







I did not make this demo, but there is a link to the code in the description. This was found on YouTube, and I thought it was cooll so I added it.
Off the top of my head, when the player wants to enter a vehicle, I would have the mesh for the player vanish, and then have the mesh for the vehicle become my new mesh.