Why are all casts but one failing?

Casting to MyPiece1 never fails, but will always fail when casting to other actors of the same class (like MyPiece2 and MyPiece3 shown).

You’re casting the same thing every time ( the same array element ), it can only be one type of thing. So the first cast works ( because it is of type MyPiece1 ), but the others fail.

What are you trying to do?

( For this to work, you would need the 'MyPiece’s to be sub classes of each other… )

Agreed, index “0” must be the correct type while the other ones aren’t. And you are as mentioned above only ever using the first array index. For help with casting and creating references check out video #1 and #25. Should point you in the right direction with this and how to properly cast/reference these actors.

Thank you, the indexes were the problem :slight_smile: