Author Topic: Checking for multiple variables in one If statement  (Read 539 times)

Is this possible?

I need to check for two different variables in one If statement in VCE.

Both will be checked to have the same value obviously, I just need to know if I'm typing something in wrong because I can't seem to get it to work. ( [A B] or [A, B] do not work)

Any suggestion/resource/link that can help me fix or find another way around this problem would be appreciated.


No you can't.

What you can do is
ifVariable [var1] [==] [var2] [num num]

What are you using it for?

You could just check one variable, and if that is true check the second. Then if that is true do the desired event.

What are you using it for?

I was using for a smelter that requires both coal and ore to function.

You could just check one variable, and if that is true check the second. Then if that is true do the desired event.

I understand what you're saying. I've already used that system for upgrades.

My problem was trying to enable large quantities of coal and iron to be smelted.
For example: it first checks for 100 coal & ore, then 50, then 10, and so on.

I had already done something similar with enabling resources to be quickly transferred into a "team stockpile". However, doing the same while simultaneously checking two different variables proved to be rather messy and unnecessary.

At any rate, I've had to work around it, but I have fixed the problem.

Thanks for the help nonetheless.