x

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"

Getting Variable of Spawned Actor?

I'm working on a little thing where most of the actors have been spawned in instead of being in the level at the beginning, and I need one to check a variable in an actor it hits. I've searched around online, but I can't figure out how to get it to access the other actor's variable. What should I be doing?

Product Version: UE 4.18
Tags:
more ▼

asked Feb 04 '18 at 04:28 AM in Blueprint Scripting

avatar image

savannahs11
1 2 1

avatar image erik321123 Feb 04 '18 at 03:54 PM

If you can show us how you spawn the actor and how it is related to other classes we might be able to help you

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

1 answer: sort voted first

When you spawn an actor, you can get its variable as output. When you use Hit Functions or Overlap Functions you can get OtherActor variable as AActor type. If you want to access the class of the actor, you have to cast the AActor type to the class of the actor.

more ▼

answered Feb 04 '18 at 04:20 PM

avatar image

Scienziatogm
371 44 40 51

(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