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"

Actors inside TArray

Hello, is there a way to store actors inside TArray, but without keeping them in the world?

I'm using an inventory system, where I can store very huge amount of items. The problem is that I have to move from one level to another. So I cannot keep items in world at any case.

Product Version: Not Selected
Tags:
more ▼

asked Dec 12 '14 at 09:51 PM in C++ Programming

avatar image

Rezental
88 5 10 18

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Actors are part of the world. If you want them to persist, make them UObject derived instead. Or store the names of the items in your GameInstance and spawn them again once the new level is loaded. Lots of variations you can do if you save the data and then read it again once your new level is loaded.

more ▼

answered Dec 13 '14 at 12:19 AM

avatar image

joeGraf STAFF
1.5k 35 12 69

avatar image Rezental Dec 13 '14 at 03:12 PM

Thank you, I will try to use UObject to store item data of my item Actor.

avatar image Rezental Dec 13 '14 at 10:36 PM

I have a problem now. How can I set AActor before spawning it? I keep information about mesh and other stuff inside UObject and I would like to send this settings to AActor before I spawn it.

(comments are locked)
10|2000 characters needed characters left
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