- Home /
Question by
Skyline Studios · May 24, 2014 at 08:10 PM ·
variablemoneymmorpg
Help with variables...
var lvl = 1;
var EXP = 0;
var atkstr = 10;
var expreq = 100;
var XPdrop: die;
EXP = EXP + XPdrop.EXPDROP;
function Update () {
if (EXP >= expreq){
lvl = lvl + 1;
EXP = 0;
atkstr = atkstr + 5;
expreq = expreq + 50;
}
}
I need help, I want my variable, XPdrop, to work with all objects with the die script attached however it only works with one object that I put in the variable box in unity. Does anyone know how to make this work with all objects with the die script attached to it? Thanks ps I've looked everywhere for answers but can't find any so any help is appreciated.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613145814im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
What's the best scripting language for a mmorpg? 3 Answers
GUI.DrawTexture Error & Static Variables!! 2 Answers