Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Need some help with actors spawning in game.

Hello everyone! I need some help on how to access a variable reference on an actor that spawns in-game. I have an actor that spawns when my enemy AI dies, and I need it to be able to access a blueprint reference on spawn. Here's my blueprints!

alt text

This is inside the spawned actors blueprint, where I need to set my piece number for a function in another blueprint. It's the My Character node that's not being accessed when spawned, since I otherwise set it to the character in the main editor.

alt text

This is in the enemy AIs blueprint, where I spawn the pieces. Is it that I need to set an instigator and/or an owner?

Thanks in advance!

Product Version: UE 4.10
pickupsetpiece.png (100.4 kB)
spawncode.png (113.8 kB)
more ▼

asked Apr 23 '16 at 11:49 AM in Blueprint Scripting

avatar image

31 10 8 14

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You can get the Return Value of the Spawn Node alt text

capture.png (42.2 kB)
more ▼

answered Apr 23 '16 at 01:25 PM

avatar image

277 5 8 22

avatar image norabrora Apr 23 '16 at 02:28 PM

Sorry but how will that help? Maybe I'm just a little new with this but I don't understand how that will make it so that the actor can access the reference... Can you explain a little more?

avatar image Plosnita Apr 23 '16 at 02:49 PM

That is the actor spawned. I understood that you want to keep a reference to it, to do something with it. Just pass it around to whomever needs it

avatar image norabrora Apr 23 '16 at 04:33 PM

Well, I put a simple "get" node from that output and now it doesn't show the error message that it can't access the "my character" variable... So I guess that's good! But I actually don't need a reference to the spawned actor, but to "My Character", but since I'm not getting any errors anymore I'm guessing that's quite good. Thanks for your help!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question