The question is pretty vague, I hope I can explain this.
My issue is this: I spawn an actor, and set it in a variable. However, even though the custom event which sets the variable plays before a print string, the print string will print “none”. However, if I do it again, the print string will give me previously spawned actor.
How do I get the variable to get accessed the first ?
Here is a screenshot. If I need to explain further, just ask:
Can you show your function. I see no OUT there
You could use “Spawn Actor from Class”.
In this case you have an output that you can use for “Equip Actor” Print String. It should work.
If you need the network thing, you can make a “Switch Has authority”.
Maybe that helps. If you need a BP example, tell me
It’s a custom event, because it needs to be replicated
The one and onyl thing it does it spawn an actor (random item), and sets the variable.
What is confusing me is this: “Spawn” runs first, right? So, why is the print string returning “None”, and it I run it a second , the print returns the previously spawned actor, instead of the currently spawned one.
It seems as though, the print is running BEFORE Spawn… Or something.
The Spawn event does use Spawn Actor, and it uses the output to set the variable