How do I change a variable that is in a different blueprint?

There are various ways to do it. You could have a direct reference to your spawner in every pick up object or inside your character blueprint. You could also use the get all actors of class node and use it to look for your spawner class, in your pick up object when the overlap or hit event is triggered. And finally, the solution that I like the most for this type of cases is an event dispatcher.

An event dispatcher allows you to send a message to any class that you want when something happens and you can pass any info into this message. So here we go.

First go to your character class. This is the class that will be broadcasting the message.

Add an event dispatcher with the + button in the event dispatcher tab. Name it what you want. Now make a new function and drag the dispatcher to the graph. A little menu will appear. Chose “call” and connect it in the function. Like this:

Now go to your zombie spawner blueprint

On begin play do this. Get your character cast it to your own Character class (Liam_CH) and drag from the reference pin in the Cast and search for assign “name of your event dispatcher”. Now when you choose this action it should create an event automatically for you, in this event is where you set the max zombies variable to whatever you want.

Finally go to your pick up object.

In this object I’m pretty sure you have an overlap or hit event for when the player touches it. So from this event drag from the other actor pin, which is a reference to your player, cast it to your Character class and from this call the function that you created it that calls the event dispatcher. Like this.

So now, everytime your character picks up an object of this type it will send a message to every zombie spawner so they can do something about it.

Tell me if you have any questions!