- Home /
Question by
tnek04 · Dec 13, 2013 at 02:14 PM ·
javascript
how can i create poor , good and excellent output ?
so i have this scripts here that will calculate my averageAttention .
this is the fisrt script
eSenseValues = new float[session.thinkGearEvents.Length];
var cumulativeAttention : float = 0.0;
for(var i = 0; i < session.thinkGearEvents.Length; i++){
eSenseValues[i] = session.thinkGearEvents[i].attention;
cumulativeAttention += eSenseValues[i];
}
second script
averageAttention = session.thinkGearEvents.Length > 0 ? cumulativeAttention / session.thinkGearEvents.Length : 100;
the problem now here is , if the averageAttention is 1 to 39 it will tell that the averageattention is poor and else if the averageAttention is 40 to 60 it will tell that the score is Average and then inset those code to the second script .how can i make this second script,? please help me
Comment
Your answer

Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Can't add .Js script 0 Answers
How to fracture/destroy in unity. 1 Answer
How to stop head from going through stuff? 1 Answer
Generated Terrain not colliding! HALP. 0 Answers