Problem with path code in this section

I’ve noticed a couple people reporting confusion over path issues in this lecture, and there aren’t clear explanations. And this really needs one of those “Rick from the future” corrections.

The problem is this section clearly gives the impression that the coroutine you are writing in EnemySpawner will control the path the enemy will take. Rick talks that way, and shows it after finishing the code. But in this section (99), the path is NOT controlled by the EnemySpawner yet. That will only happen in section 100. In section 99, the path is still controlled by the WaveConfig attached directly to the prefab, and the code in EnemyPathing. So when Rick demoed, the path it was following was completely unrelated to the new code.

I spent a lot of time trying to make sense of how the code Rick had could possible control the enemy path as it was. I kept rewinding the video to see if there was anything I missed. Eventually I decided I had to write something that would update the WaveConfig in EnermyPathing, and created a SetWaveConfig() method. Then lo and behold, I get to section 100, and Rick does exactly that. It was nice to see, and I gave myself a pat in the back, but there was a lot of wasted time for no reason. I know there are times Rick wants us to figure things out on our own, but I’m pretty sure this was not intentional.

I love the class, and it has been 99% accurate, but this is one place that could really use a quick “Rick from the future” update.

3 Likes

thanks so much you helped me a lot <3

You’re welcome. I’ve gotten a lot of help in these forums.

I was starting to wonder if I was the only one who had an issue, particularly because I didn’t get any feedback from Nina, the friendly TA. I think maybe it’s because I posted as TALK, instead of ASK.

Thanks for the info, I was also quite confused!

Privacy & Terms