Getting Accessed None

Hi,

I’m guessing that you are spawning your enemies from your ‘SpawnBlueprint’, and you want to send info back to the spawner right?

Go to the properties of your ‘SpawnBlueprint’ variable and click the ‘Editable’ and ‘ExposedOnSpawn’ checkboxes. These options will expose this variable to the ‘SpawnActorFromClass’ node. This means, that in your spawner, where you spawn your zombies, simply connect a ‘Self’ reference (right click-get a reference to self) to the exposed ‘SpawnBlueprint’ input.

After this, you shouldn’t get Accesed None error anymore.

The reason you are getting it now is (as others mentioed) that you haven’t initialized your variable and give it a value, it is currently null (‘SpawnBlueprint’ is only the type, you also need a value).

Imagine if you had 2 spawners in your level, and any of that 2 spawners can spawn zombies, and you want to check how many zombies are alive spawned by a certain spawner. When you would add 1 to your ‘ZombiesAlive’ variable, you would want to change the value in the spawner that spawned the zombie. But if you wouldn’t initialize it (give it a value), how would the game know which spawner to add 1 more alive zombies to, there are 2?! By exposing the ‘SpawnBlueprint’ and inputing a self reference, you tell your zombie when it spawns which spawner belongs to him, so he will know which spawner to update.

I hope this will help you a bit!