PhaserEditor2D-v3
PhaserEditor2D-v3 copied to clipboard
[Feature request] Multiple same type of component attached to game object
Dear Phaser Editor Devs,
Hi,
Can we have a feature that allows us to add multiple components of the same type to a game object? Like Unity? We want to add things like status effects, inventory checks etc in editor
Cheers
Yes. That's in the plan. Thanks!
However, it would be great if someday you find the time to explain with more details a case where you need it. It will help me to implement a solution that fits more cases.
happy to provide an example we have a character in game that can buy and equip (or simply keep in their inventory), clothing items that fit into various categories (head, feet, hands etc). Certain areas of the world are locked off until you either own or equip a certain item. we want to be able to add ItemOwnership component to room triggers. This component would have properties like item slot: select option item id: integer needs to be equipped: checkbox (if unticked, owning an item is enough)
So if a room trigger requires multiple items, you would add multiple components and provide different configuration options.
Hi @aleksei-tro!
Thanks for the example. And how are you solving it now?
Hi. I'm going to implement this but not with the user components, else with a new ScriptObject type. Keep in contact.
You can make this with the Script Nodes https://help-v3.phasereditor2d.com/scene-editor/script-node.html