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"

C++ if statements are ignored

So im working to create a system that loops through and spawns actors. However I want it to spawn a different actor first then spawn the regular variety. to do this i have a for loop that loops through until its spawned the right number of actors. Issue I'm having is that it ignores all if statements so I cant spawn the starting room actor. I've debugged it to the if statements being the problem. Ive tried it running in Begin play and a seperate function that is called but it still fails at the if statements.I know that the spawning code is good as if i put it in the for loop outside the if statements it spawns the correct numbers. I've been coding a while but only recently started using C++ in unreal so I'm assuming I'm just missing something about unreal, that or being a spanner.

alt text here is the code snippet any help would be greatly appreciated.

Product Version: UE 4.15
Tags:
code-issue-3.png (104.3 kB)
more ▼

asked May 17 '18 at 12:26 PM in C++ Programming

avatar image

themightysquig
1 4

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

1 answer: sort voted first

Well looks like Unreal was having a moment after the 3rd restart it is now working as it should. So if any one does have this issue, I solved it by closing the unreal editor leaving Visual studio open, recomplied it and ran it from VS and it seemed to work, reopend the Unreal project and its now working as planned.

more ▼

answered May 17 '18 at 01:05 PM

avatar image

themightysquig
1 4

avatar image cesar_montero Jul 22 '19 at 09:21 AM

I'm having the same issue but mine doesn't work even after I rebuild. This is really odd

(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