Hi all, I’ve looked but can’t find the answer anywhere else, sorry if it’s out there and I can’t find it.
All I want to do is call one of two separate coroutines with one key press, depending on the state of another boolean variable. The following works fine…
if(Input.GetKeyDown(KeyCode.I) && follow)
{
bcOn();
}
if(Input.GetKeyDown(KeyCode.O) && boardChopper)
{
followOn();
}
however, if I change that O keystroke to an I, it doesn’t work. No errors in the console, but the coroutines aren’t called. It’s driving me mad!
I know it’s coding 101 (ha, binary joke), and I’m missing something really simple, but I just can’t see it.
Any help greatly appreciated
Ian
I notice you're using
– hoy_smallfry&&. Sanity check time! Check iffollowandboardChopperare true. If one of them isn't, then that might explain why you aren't getting two calls.Thanks, but I have. Like I say, the code itself works fine with another key subbed in for one set of code, and the letter "I"'s not used elsewhere. Very strange :-/
– husbandofemily