I am making several items, and need to set them as being interactable with each other.
Item i1 = Item("Item 1");
Item i2 = Item("Item 2");
Item i3 = Item("Item 3");
Item i4 = Item("Item 4");
i1.setInteractable({i2,i3});
i2.setInteractable({i1,i4});
i3.setInteractable({i1});
This is the method header for the setInteractable method in Item.
void setInteractable(Item i[]);
The interactable items are stored as such:
static Item interactableItems[25];
This doesn't work, the error occurs after the first curly brace. What is the correct way to do this in C++?