Title could look vague, so here's what I actually mean.
Three groups of people are walking in the city. These are Guards, Thieves and Citizens.
Something has happened in the city, Thief have stolen a pocket from a Citizen, the Guard walking around was close enough to see the crime, so now he's chasing Thief.
So here's the question, how that chain work in blueprint perspective?
We can imagine there is a some kind of StateCheckingActor placed in the world. When Thief steals a pocket, it's blueprint (or Citizen's blueprint) would broadcast a message to the StateCheckingActor. After StateCheckingActor is aware of crime it would broadcast message to the Guards walking around making them aware of crime.
Well, broadcasting stuff doesn't look complex, that could be a simple event dispatcher. But how would Thieves, Citizens and Guards hold a reference to StateCheckingActor? And what StateCheckingActor should even look like? Should it be an actor placed somewhere in the level? Should other actors access it when spawned with GetAllActorsOfClass(StateCheckingActor)?
The issue looks pretty similar to GTA where events are broadcaster to nearby police cars when crime is happening, but what would make a broadcast?
Three groups of people are walking in the city. These are Guards, Thieves and Citizens.
Something has happened in the city, Thief have stolen a pocket from a Citizen, the Guard walking around was close enough to see the crime, so now he's chasing Thief.
So here's the question, how that chain work in blueprint perspective?
We can imagine there is a some kind of StateCheckingActor placed in the world. When Thief steals a pocket, it's blueprint (or Citizen's blueprint) would broadcast a message to the StateCheckingActor. After StateCheckingActor is aware of crime it would broadcast message to the Guards walking around making them aware of crime.
Well, broadcasting stuff doesn't look complex, that could be a simple event dispatcher. But how would Thieves, Citizens and Guards hold a reference to StateCheckingActor? And what StateCheckingActor should even look like? Should it be an actor placed somewhere in the level? Should other actors access it when spawned with GetAllActorsOfClass(StateCheckingActor)?
The issue looks pretty similar to GTA where events are broadcaster to nearby police cars when crime is happening, but what would make a broadcast?
Comment