October 8, 2016, 1:20pm
I am handling “Blueprint Used” on a “Primal Item Base” derived item in my inventory. Works fine, but I need to spawn an Actor into the world and I need that actor to be spawned on the server.
can’t use SpawnActor because the primal item is an object not an actor and I get the complaints about connecting (the non-existant) world context pin.
I have tried getting the Game state object and using the “BPNet Spawn Actor at Location” function which does spawn my class but on the connected clients and not on the dedicated server.
Anybody got a way to spawn a server actor from an inventory object? or can I somehow spawn a server actor at game start from my mod I can then use for server access?
Thanks in advance!
October 8, 2016, 4:30pm
Did you try without a world context? I just tried the other day from a structure and it was successful. Alternatively, use a custom event and when you left click the box, at the bottom left of the window is options for the event. Just switch the drop down menu to “Runs on Server” and check off Reliable. This will run the event strictly server side.
October 8, 2016, 5:34pm
From a placed structure is fine, it has an actual actor which I believe supplies the required world context.
I am trying to do this one from the inventory object which does not derive from Actor. The blueprint fails to comply with the missing pin error.
The event is marked as server side, but the BPNet spawn actor at location function still seems to only spawn the objects on the clients and not the dedicated server
This functionality already exists in the defaults for PrimalItems… why are you trying to reinvent the wheel?
Literally just search for “spawn” and I’m pretty confident you’ll find all you’ll need… that or look at the Raft’s PrimalItem as this does - essentially - the same thing?
October 8, 2016, 10:07pm
Thanks, don’t want to reinvent the wheel, don’t want to replace the inventory item with a spawned raft (know how to do that), just want to be able to spawn a server side actor from an object blueprint (ie call spawn actor from object without the compile error).
Hopefully really simple request??
Yes? Again, I don’t know why you insist on graphing this when
what you want to do is available publicly, natively, in the PrimalItem defaults. exactly
Just re-use what they do for the raft, but don’t, you know, actually spawn the raft, spawn whatever else it is you’re wanting to spawn instead?
All spawning occurs on the server, in fact it
occur on the server for the actor to be available/relevant/visible to any other client… must
I really don’t know how “simpler” it can get than using what Wildcard has provided natively.