Skip to main content
Question

Is there a way to swap two nested instances of the same component at the same with one swap?

  • January 14, 2025
  • 2 replies
  • 72 views

Kebsu

I’m working on a mod for a game. The file allows to swap inventory icons for ammunition and edit them to the user’s liking. 

Now, i’m new to Figma and this is all a trial and error kinda learning, so far i could do everything i wanted precisely how i wanted.

I’ve hit a wall which is technically only a minor inconvenience: I have a component with “bullet tips”, each variant is just one bullet tip. I have another component which are whole “bullet cartridges”, and each variant has between 1 and 3 bullets in it. Each bullet (a separate group within a component) has a nested instance for bullet tip swap, so the “cartridges” component variants have 1-3 nested instances of “bullet tips”

The cartridge is then nested in the final “ammo box” instance that has all of the nested components swaps listed.

Now the problem i have is that the nested instance swap shows 1-3 bullet tip swaps based on the number of bullets of course. What i want to do, since they’re supposed to be the same, is to have ONE swap to chance all of the bullet tips of the nested componnent. 

Example:

As you can see, there’s two “bullet tips” instances and they can be changed independently, is there a way to make them change both at once? 

Other way than making a component with two bullet tips perfectly positioned to fit different cartridges? Because now a user can pick ANY bullet tip for any cartridge/size and they scale properly to the bullet, once i would have to settle for multiple-bullet instances that option no longer works as depending on the caliber of bullets they would have different number, position and scale, so it would be not possible and i would have to make separate component with bullet tips for every caliber.

I can always just leave it as it is but that’s just meh.

Any ideas? Is there a way to join two identical instances to swap at once to the same variant?

Avokadomos
  • New Participant
  • January 18, 2025

So your cartridge component has variants with 1-3 bullet tip components. When you change from a cartridge type with 1 cartridge, to one with 2 or 3 cartridges, only one of the bullet tips changes variants while the rest remains the same or default? Hve I understood this correctly?


Kebsu
  • New Member
  • January 20, 2025
Avokadomos wrote:

So your cartridge component has variants with 1-3 bullet tip components. When you change from a cartridge type with 1 cartridge, to one with 2 or 3 cartridges, only one of the bullet tips changes variants while the rest remains the same or default? Hve I understood this correctly?

Not this big scope of a problem, no. 
What i meant was that i have all 1-3 bullet tip swaps listed separately, (depending of the cartridge variant) and wondered is there a way to make them all swap on one variant swap. Maybe is there a way to link them somehow? For now the only way i’ve found to make it happen is to create a load of variants that have 2 and a lot of variants that have 3 bullet tips which is just a LOT of unnecessary work.

I can leave it as it is but technically, when i pick a cartridge variant...: 

And now would like to change the bullet tips, i shouldn’t (as a user) be able to select two different bullet tips for each bullet. But i can, which makes no sense.


So again, my only question here is: can i somehow connect 2-3 instances of the same component (identical instances) to swap to other variant together/ make them all swap at one selection?

I know i can just select both of them by hand, but the entire idea of this file is that user can just click a box and adjust everything from the list on the right.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings