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"

ForEachLoop causes infinite loop error

Hello, I am new to UE4, so dont expect me to know much. However, i tried to create a dynamic room, so i tried to spawn walls, their location stored in an Array. Following unexpected error occured while testing: alt text

BP:alt text

I hope you can help me since i dont know the actual problem.

Product Version: UE 4.18
Tags:
2017-12-13-2.png (14.9 kB)
2017-12-13.png (279.1 kB)
more ▼

asked Dec 13 '17 at 02:49 PM in Blueprint Scripting

avatar image

Alidro
3 1 2

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

2 answers: sort voted first

This is a textbook infinite recursion issue.

In the BeginPlay of WallBP, you're spawning more WallBPs, which calls BeginPlay on those, which spawns more WallBPs, which calls BeginPlay on those, etc..

What are you trying to achieve?

more ▼

answered Dec 13 '17 at 03:30 PM

avatar image

RotemS
198 3 8 14

avatar image Alidro Dec 13 '17 at 03:44 PM

thank you, that makes sense. I try to to create a room, which i can modify while running the game. the wall is just one actor to start with, also, i want the Array to be filled through another algorithm, this here was just to try the spawning.

avatar image RotemS Dec 13 '17 at 03:46 PM

Logically a different actor should be in charge of spawning more walls, not the wall class itself.

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

Is your location array empty? Maybe if it is, then it would be a 0 loop....

Would me my suggestion

more ▼

answered Dec 13 '17 at 03:01 PM

avatar image

Evil_Fischi
287 8 14 20

(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