How do I…
In my architecture, I use a lot of linked object. It is a game where one can place Tile Objects (TO) on Base Tiles (BT), which then become linked. I link also the pointer object to both the BT it is currently pointing, and the currently selected TO to be added.
To see if the placement of the new TO (linked to the pointer) is valid, I want to go through the BT (linked to the pointer too), and evaluate if the already placed TOs (linked to the BT) match the rules requested by the new TO.
In the event sheet, I do a 1st take into account all linked object to get the new selected TO and the pointed BT, and then I want to make a for each all object and narrow to the TOs linked to the BT, and control the rule of the select TO.
What is the expected result
I expect the for each to go through all the TOs linked to the BT, and control the placement rule.
What is the actual result
The for each get only through the TO selected. I assume the previous filter “take into account linked object” prevents the call of the other objects.
Related screenshots
I’m having trouble imagining what you’re doing. Can you explain further or maybe add a screenshot or video link of your project in action.
hello! have you tried a “pick all instances” ?
“pick all instances” kills the picking list for this events and sub events. this will work for the highlighted “reapeat for each instances” of your second screenshot.
the picking list get killed only for the object selected in the “pick all instances” event. because you only need to cycle through all tile objects and not base tiles, its possible to keep the picking list of the orinial picked base tile of the parent event, and continue further picking operation from there.
if you need to kill the picking list for all your important objects but also needing the events to “remember” the original picking list from the parent when going further down the sub-events, then you have to “save” which object are picked as soon as you do the original picking. for example, you could add an object variable “remember picking” or something…
Thank you very much, the pick all instance actually acts as a reset. I still need to do a for each object after, but it now take into account all objects, and I can filter it as I need adequately.