Calvert
Member
I'm sure there is a very basic function to simplify this code, I just haven't learned it yet. I have a few hundred numbers to program, so learning this right now is very important to me. I've written a small piece of basic code for an example. The simplified idea is to check if a variable has a value from 48-50, it produces a specific outcome, without having to actually write out all numbers from 48-50!
Any thoughts?
Code:
if global.light = 50
{
global.torch = 5;
}
if global.light = 49
{
global.torch = 5;
}
if global.light = 48
{
global.torch = 5;
}