How do i get multiple Boolean values from other actor?

If you make it Instance Editable and actually assign it value, then you wouldn’t even need to cast. It would just work.

2 Likes

so should i try just not casting it then?

If you want access another actor (the mast) you need to know where it is. And you need to know where the ship is, too. So, where are they?

Perhaps you could explain more about how ship building works in your game. Where things are and who spawns whom? For example:

  • how does the ship get into the game
  • how does the mast get into game

The variables are only there to track where things are. The variables are not the actors.

My suggestion was to use your ORIGINAL GRAPH and only replace the make array node with the “AND” node. Adding a sequence node is not compatible with my suggestion.

Now, because the AND node doesn’t have a white execution pin, it MAY be possible to have it work with what was mentioned above where the LAST white pin from your sequence node would be connected to the branch node and ONLY that node. But I’d still remove the sequence node. It’s far easier.

edit: Note that the other people commenting are correct. If BP_Mast1, BP_Mast2, etc. are variables, they need to be assigned before your graph executes (in BeginPlay or by another graph or code).

1 Like

If anyone needs help with this i fixed my code using Get Actor of Class node instead as shone here

If you use this a lot, you might want to store those actors as variables because Get Actor Of Class is a slow operation. Also, it only returns the first instance. If you have multiple instances, it won’t work.

1 Like

Nothing else has worked, i tried all the others so this is the best one for what I’m doing, and could be the best for what others are doing.

Please read my comment again.

1 Like