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"

Why can't I edit the value of an array of actor ?

Hello. I'm trying to reference every actors I create in an array so I could use it to spawn objects then but when I try to edit the variable it says "Editing this value is not allowed", I didn't put the variable in the blueprint yet so I don't understand why couldn't I be able to edit it ? Thank you

Product Version: Not Selected
Tags:
more ▼

asked Apr 29 '14 at 01:39 AM in Blueprint Scripting

avatar image

Eresea
49 16 22 29

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

1 answer: sort voted first

You must add them during runtime.

AActor* is the underlying type and it is a pointer. Since it is not a simple data type the potential exists that you could try and reference something in the Pre-PIE / Pre-Game world that would not exist in PIE, or does not exist until PIE.

To reduce chances of errors like this (which would crash the Editor to desktop), you are encouraged/required to add the AActor* elements after game time starts.

Solution

After game start, use the appropriate Array nodes to add the actors you want to the array.

:)

Rama

more ▼

answered Apr 29 '14 at 01:48 AM

avatar image

Rama
10.6k 446 346 1088

avatar image Eresea Apr 29 '14 at 01:52 AM

Thank you that did the trick !

avatar image Rama Apr 29 '14 at 01:54 AM

ooh neat! if you are issue is resolved, please click the check mark next to my post so Epic knows the issue is under control :)

(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