# [Question] Operators

I wish you cliffski and you all a relaxed evening,

I have a question, which I got by creating a new situation in case of a new policy.

Does the engine allow operators like ‘<, > and =’ to create ‘if-else cases’ for the gameplay?

Could you give more details about what you’re trying to achieve? Maybe there’s a way to do it within the system at the moment?

-El

Good evening cliffski,
good evening Elinor,

In my first try to make a modification for the game I would like to create a new situation, which is based from an value of a policy and from an statistical value, for example crime rate, debt value etc…
At the moment I am searching for a possible solution, that will activate the new situation, if the value of the policy has reached 100 % and the statistic-value has also reached a specific value.

For example: Value of Policy = 100 % AND Statistic-Value (CrimeRate) > 50 % -> Situation will be activated

In addition to that, I have another question to the situation.csv file:
What is the aim/intention of the variable ‘x’ in the ‘Input’ and ‘Output’ area of the code?

Hi Struck,

The x in the input/output part relate to the variable you’re looking at. If you have ‘Environment,1.0-(1.0*x)’ in your inputs, it means that the value of the situation will be 1.0 - 1.0 * the value of the environment. This will be between 1 and 0. The value of the situation is the sum of the inputs.

I think what you want can be achieved using two inputs. Your first input can be something like ‘yourPolicy,0+(x^100)0.5’. This will make the value of this input really, really tiny unless it’s value is 1, at which point it will be 0.5 (due to the multiplication). The second input will be 'CrimeRate,0+(0.5x)’, which gives you the crime rate divided by two. This means the value of the situation will be 0-0.5 when the policy is not at 100, and 0.5-1.0 when it is. Then set the triggers so that it triggers when you want it to, e.g. having the ‘on’ trigger at 0.75, so it triggers on when the you have the policy at 100% and when Crime rate is at least 50%.

I hope this helps.

-El

Hi Elinor,

I had the same idea of the aim of the variable ‘x’ in this file, thank you for your help here.
Also special thanks to you for your great explanation, which is useful in my case I think.

-Struck-