What is wrong?
OK, I decided to try to make a turn base game where every turn the enemy moves randomly in 1 of 4 directions as long as he ain't outside the screen. So I got checks to check his position, my problem is this code here;
float mover = Random.Range(0f, 4f); // here it choose a number;
if (mover = 1) { // here it checks the number;
it suppose to choose 1 to 4 and then send that number to the rest of the script but it keeps running into int bool error. I've tried changing mover to int and float but neither have effect to change the error can someone tell me how I can get what I want? Oh yea I want the numbers to be whole too.
Answer by omerselman · Jun 28, 2017 at 08:12 PM
if(mover == 1) {do something}
show me the rest of the script where you use that float especially
i got it to work. after yelling at it for few ty anyways.
Your answer
![](https://koobas.hobune.stream/wayback/20220612125057im_/https://answers.unity.com/themes/thub/images/avi.jpg)