Problems with Struts within an array.

I am developing my own quest system. Within the system I have an ActiveQuest (Array) with a QuestInfo (Structure) within that structure I have a Objectives (Array) with a ObjectivesInfo (Structure).

The problem I am having is when I set the Objectives complete boolean on the first objective all is find but when I set the Objectives complete boolean on the second objective the first one is set to false.

I am using Set members in ObjectivesInfo.

Any Ideas why I cant set both to true?

Hey @Billdownie64!

Are you using the “Set Members of Struct” node? That’s the only way to actually set members of the struct individually! It’s different from most variables as it’s a container. When you use “Set Struct” it’s actually changing the container itself and resetting it. :slight_smile: Hope that helps!

Yes I am set attached.

I have done some debugging see attached screen shots.

Objective1 Image you can see the ObjectComplete is set to true.

Objective2 Image you can see that ObjectComplete in array[0] has changed to False where as ObjectComplete in array[1] is set to True

Has anyone any idea why this is happening?

Screen shot of the blueprint.

I’m not quite sure what you are doing…

There are too many loose ends from the fact that your index is Objective_ID - Quest_ID -1 to the last node where you always set index 0 to the struct you got from the table.

Try this:

Note that no checks are made so ridiculous inputs like 100, 100 will produce 200 entities.

Also the Data Table is not modified - it shouldn’t be.