Here is an example script:

MinimumWage = MinimumWage - Poverty/10;

So, what I want is function update constantly checking that “MinimumWage” equals Poverty/10. But, it constantly minus’s the number every function which I get and understand. I don’t want to add any extra variables… like"

if(CheckMinimumWage == true){
LawMinimumWage  = LawMinimumWage - Poverty/10;
}

This is so hard to explain… So I only want the script to do the math once, but constantly check if it has to do the math, without it going crazy and going into the negatives.

For Example, if MinimumWage = 20, And Poverty = 100, I want the script to do the math once, and MinimumWage to equal 10 in the end. (Also, it cant be a “one time function” I need it to work for constant changes in Poverty and or MinimumWage)

Is there any easy way out of this? or do I need a bunch of variables added (that I don’t want) Sorry if I cant explain this well… Any help is appreciated.

If I’m understanding your question correctly, you shouldn’t need any other variables.

Can you do something like this:

int minimumWage;
int poverty;

function Update () {
     if(minimumWage < poverty/10)
         minimumWage = poverty/10;
}

maybe you should create 1 new variable like “NewMinimumWage” and use it? because in that way your MinimumWage will not decrease.

float NewMinimumWage = 0;
NewMinimumWage = MinimumWage - Poverty/10;