hpmornitor

Nastudio

New member
I've made a mental slide, but if the mental slide drops, I want to make the maximum value of the hp slide decrease, and I can't pull the slide because of the access ban, so how do I approach it?
This code was added to 'hpmoritor'

public Slider Mentalslider;
float mentalgage;

private void UpdateUI(Damageable damageable){
if (Mentalslider.value > 70f)
h = 1;
else{
h = 0.5f;}
m_Slider.maxValue = h * m_Damageable.MaxHp;
m_Slider.value = 100 * m_Damageable.CurrentHp / (float)m_Damageable.MaxHp;
m_HpTextText.text = m_Damageable.CurrentHp.ToString().PadLeft(3) + " / " + (h * m_Damageable.MaxHp).ToString();
}

What's the problem?
 
And when making 2d, can I delete the no animation error of the playercharactor script? Or is there a playercharactor script available in 2d?
 
The Character Controller in the demo scene wasn't really designed to be used outside of the demo. It's just there to showcase the multiple features of the Inventory system.

As for "Access ban", I'm guessing you are talking about how your scipts can't reference ours?
If that's the case then you should learn more about Assembly Definitions. Our code is in an Assebly Definition so you simply need to create your own and reference ours to get access to all our code. You'll find more information in the links below:

(There are no 2D demo, but the Inventory system is completely dimension independant. We just went with a 3D demo because we thought it would be more popular)
 
Top