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"

A ForEachLoop inside another ForEachLoop not executing?

I am checking 2 different arrays and see if their values are equal. I have an array of weapons and array of the players inventory, I am checking to make sure that if the player has the weapon in the inventory then we don't duplicate it or equip it. I am trying to do 2 foreachloop's one inside the other but the probem is that the second foreachloop loop body does not execute. Check the image below:

alt text

What am I doing wrong? Is there another method for checking 2 different arrays?

Product Version: Not Selected
Tags:
untitled.png (310.9 kB)
more ▼

asked Sep 28 '14 at 07:22 PM in Blueprint Scripting

avatar image

JakeOfSpades
185 12 15 26

avatar image Erasio Sep 29 '14 at 02:29 AM

Are you sure the "Weapon Inventory" array is filled when you execute those loops?

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

1 answer: sort voted first

I found another way of solving this issue, I put a boolean in each Weapon object to see if it was equipped or not instead of 2 foreach loops, maybe my array was not populated or something. Either way I achieved what I wanted, live and learn.

more ▼

answered Sep 29 '14 at 02:32 AM

avatar image

JakeOfSpades
185 12 15 26

(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