#Different stats from enemies
1 messages · Page 1 of 1 (latest)
okay show me your stat script
That's not a SO
Use SO instead... i'll help you
Now make the scriptableobject. from Project.
and assign than to each enemy you have
wdym by tht just make a script tht can hold the values from the so?
ive made 2 stats so
yes one of the so advantage was so can change the value at the runtime whatever you want.
you only need 1 stats.
ye ik i need on like script to make the so but how would i call it on a damageplayer script
you can either use Serialize or GetComponent like you did before.
so the prob i was having with so was the values wouldnt change from enemy to enemy
so say id hit enemy 1 woith a dmg of 5. then id hit enemy 2 whos value is supposed to be 10 but it just uses the first enemys values
you can make another SO just by Right Clicking it...
just like i did...
PS : i shouldnt naming this Object < this is bad... dont do it.
Make an SO for stats, then make it visible in menu so u can create variants of enemy stats
assign that to the playerdamage script.
and you need to change your code...
or just add a new tag. for example Enemy2
errrm.. i think it's better to Serilize it use [SerializeField] private Stats enemyOne;