About 'Making NPCs Suspicious'!

In this video (objectives)…

1 Using TextureProgress as game logic 2 Adding stealth to our stealth game! 3 Quitting the game

After watching (learning outcomes)…

Update the GUI when the NPCs see the player!

(Unique Video Reference: 27_HM_GDT)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

What’s the difference between giving the SuspicionMeter a group and adding it to the Global variables?

I mean, in both cases you’re being able to access it from anywhere, and while a group can have more than one element in it, here we are intentionally making this a “single element group”, so shouldn’t we just add it to Global?

There’s a couple of reasons - first, it for some reason the group isn’t actually in game (we change something, or something goes wrong), it won’t crash the game. Second, we should avoid using global/singleton solutions unless we have to, especially in larger projects. The bigger a project gets, the harder it’ll be to debug or refactor if we have globals everywhere.

So if we can do this without a Global, it’s good practice to do so.

Thanks for the explanation! Great Course!

Privacy & Terms